Venezuela's Supreme Court says Lopez had been granted house arrest due to health problems, but his family members were unable to identify what those were. Government supporters often note Lopez's role in a short-lived 2002 coup against Hugo Chavez.
Venezuela's best-known jailed opposition leader Leopoldo Lopez was out of prison and hugging his family on Saturday after being granted house arrest following three years in jail for leading anti-government protests.
Lopez's return to his Caracas home comes as Venezuela is once again convulsed by demonstrations against socialist President Nicolas Maduro, struggling with an economic crisis and global censure for overriding the powers of the country's opposition-led congress.
Lopez, 46, a photogenic, Harvard-educated former mayor who has been barred from holding elected office, left the Ramo Verde military jail before dawn and was reunited with his wife and two young children, relatives said.
"A few days ago they had punished him with solitary confinement without light or water for three days," said his father, of the same name, in an interview with Spanish radio.
"(Now) he's hugging his children, he's with his wife ... I'm happy, he's happy of course," he added, adding that his son was wearing an electronic tag for authorities to track him.
The opposition has long called Lopez a political prisoner, and leaders around the world, including US President Donald Trump, have pressed for his release.
Maduro, who for years refused to pardon Lopez, has described him as a dangerous terrorist who sought to overthrow him through street violence. Government supporters often note Lopez's role in a short-lived 2002 coup against the late former leader Hugo Chavez when he helped arrest a minister.
Venezuela's Supreme Court said Lopez had been granted house arrest due to health problems, but his family members were unable to identify what those were.
Opposition leaders applauded Lopez's return home, but said he should be granted complete freedom, along with several hundred other jailed opponents of Maduro.
The government says all imprisoned activists are being held on legitimate charges, including coup-plotting.
State ombudsman Tarek Saab said in an interview with CNN that the measure was the result of efforts by a state-backed truth commission, which he said is also studying the release of other citizens detained amid protests.
The release was aided in part by the involvement of former Spanish Prime Minister Jose Luis Rodriguez Zapatero, who has for years maintained talks with Venezuela's government, Spanish Prime Minister Mariano Rajoy told reporters at the G20 meeting in Hamburg.
The president could be seeking to ease pressure with Lopez's return to home, but there was no sign of concessions to the opposition on other fronts.
At Maduro's behest, Venezuela on July 30 will elect a legislative superbody that can rewrite the constitution and dissolve state institutions, a move the opposition calls a naked power grab meant to keep the socialists in office against the will of the people.
Dozens of supporters stood outside Lopez's home in the upscale Caracas neighborhood of Los Palos Grandes, some wearing shirts emblazoned with Lopez's face. Lopez's mother Antonieta arrived, beaming and dressed in white.
About 100 people were gathered outside the house, waving Venezuela's flag, chanting slogans and setting off fireworks to celebrate.
"I think this is the first day of the transition," said Maria Antonieta Witzka, 57, a physical therapist. "The government is realising that we are the majority."
Lopez has faced criticism even within the opposition for at times being quick-tempered and domineering. He founded the Popular Will party after splitting with leaders of the First Justice party, which he also helped found.
Though Lopez had publicly called for peaceful resistance to Maduro in 2014 and was behind bars during most of the unrest that year which killed 43 people, prosecutors said his speeches sent subliminal messages and constituted a call to violence.
He was sentenced to nearly 14 years.
One of the prosecutors who led the case later fled the country and said the proceeding had been a mockery of justice.
The case has long been a cause celebre for opposition supporters over what they deem the Maduro government's trampling of human rights.
Lopez is the scion of wealthy families and a direct descendant of the sister of Latin American independence hero Simon Bolivar as well as of Venezuela's first president, Cristobal Mendoza.
Pro-government critics paint Lopez as a dangerous radical in the pocket of Venezuela's wealthy elite and the US government.
He has ambitions to become Venezuela's president and would likely be one of the most popular opposition aspirants in any future election.