Venezuelan opposition leader Leopoldo López fled the country on Saturday after spending the last six years in prison, house arrest and diplomatic asylum, his political party said.

López, 49, is on his way to an undisclosed international destination after leaving the Spanish embassy in Caracas, according to his political party and the Spanish Foreign Ministry. He had sought refuge in the Spanish ambassador’s residence after leading a failed military uprising against the government in April 2019.

Mr. López, a charismatic former mayor with US training and penetrating eyes, has been one of the most radical opponents of Venezuela’s authoritarian President Nicolas Maduro, whom he wanted to overthrow through street protests and increasingly desperate palace plans, for years. His maximalist tactics, however, backfired, dismantling the opposition and making it increasingly irrelevant to Venezuelan struggles amid one of the deepest economic recessions in modern history.

Mr López came closest to his goal in early 2019 when his protégé Juan Guaidó, a young lawmaker, declared himself interim president of the country, citing the fraudulent re-election of Mr Maduro. The United States and most of the European and Latin American countries were quick to give him support, separating government from the world economy.

However, Mr Maduro overcame the challenge and used his control over the security forces to gradually suppress the opposition and terrorize its supporters. As the political crisis escalated in Venezuela, the Trump administration’s sanctions in support of Mr. Guaidó’s motion to power plunged an already rapidly shrinking Venezuelan economy and population into a major humanitarian crisis.

Mr Lopez becomes the youngest opposition leader to go into exile and Mr Guaidó is becoming increasingly isolated. Mr Guaidó’s term as President of Parliament, on which he based his claim to lead the country, expires in January and threatens to leave the opposition without its last base of support.

Mr López’s party, Popular Will, said his late leader has pledged his unconditional support for Mr Guaidó and will continue to fight Mr Maduro, who has resorted to torture, extrajudicial killings and legal prosecution to keep his power under control.

“Like other Venezuelans, Leopoldo López is not completely free as long as there is a dictatorship that violates the human rights of the people,” his party said in a statement on Saturday.