Venezuela's government accused Madrid's envoy to Caracas on Sunday of being an accomplice in the "escape" of opposition leader Leopoldo Lopez to Spain.

Lopez, who had been sheltering at the Spanish ambassador's residence in Caracas for 18 months, arrived Sunday in Madrid after first crossing into Colombia.

"The head of the Spanish diplomatic mission in Venezuela served as the main organizer and confessed accomplice of the... escape from Venezuelan territory of the criminal Leopoldo Lopez," President Nicolas Maduro's government said in a statement.

Following Lopez's departure, Caracas denounced what it called "the flagrant breach of the fundamental provisions of the Vienna Convention on diplomatic relations" by Spain.

It accused Spain of "incessant" interference in Venezuelan affairs.

Venezuelan high-profile opposition politician Leopoldo Lopez, pictured in 2019, followed by his wife Lilian Tintori carrying a Venezuelan flag walks out the Spanish embassy in Caracas
Venezuelan high-profile opposition politician Leopoldo Lopez, pictured in 2019, followed by his wife Lilian Tintori carrying a Venezuelan flag walks out the Spanish embassy in Caracas AFP / RONALDO SCHEMIDT

Spanish ambassador Jesus Silva had been expelled in January 2018, also on allegations of interfering.

His return was agreed in April the same year, and Caracas says he failed to live up to his commitment to respect "Venezuelan and international laws," noting his sheltering of Lopez.

Lopez, the former mayor of Chacao, an up-market district of Caracas, was arrested in 2014 and accused of inciting violence when mass opposition protests began in Venezuela.

He served several years in prison before being released to house arrest.

His father is a Spanish European deputy with the conservative Popular Party.

In addition to rejoining his family in Madrid, Lopez will be able to contact other Venezuelan opposition leaders there, such as former Caracas mayor Antonio Ledezma.