A close ally of the late Venezuelan leader Hugo Chavez who fell out with his successor Nicolas Maduro said Saturday he had been freed after spending five years in prison.
The release of Miguel Rodriguez Torres, a former minister, was widely seen as stemming from recent reconciliation talks in Mexico between the leftist Maduro government and the Venezuelan opposition.
The talks are aimed at ending a long-running political and economic crisis.
After his release, news reports said Rodriguez Torres left for exile in Spain.
In a video posted on social media, the retired military officer said he was torn between joy over being released after five years in what he called "the gray box" and sadness over leaving.
"I am now going to travel away from my country, leave my beloved Venezuela," he said, adding that former Spanish prime minister Jose Luis Rodriguez Zapatero had worked behind the scenes for three years to secure his freedom.
Rodriguez Torres held several senior posts under Chavez during his rule from 1999 to 2013. He had joined Chavez in a failed coup in 1992.
After Chavez died of cancer in 2013 and Maduro, his hand-picked successor, took power, Rodriguez Torres stayed on to serve as interior and justice minister.
But, like other figures close to Chavez, he eventually fell out with Maduro and became an outspoken critic of his rule, until he was finally arrested by the intelligence services at a hotel in 2018.
Rodriguez Torres was accused of a slew of crimes, including treason, espionage and instigation to rebellion, but he was never convicted.