Lopez had violated the conditions of his detention and a ban on giving political statements to the media, the court said on Thursday, ordering the intelligence service Sebin to detain him.
The 48-year-old, his wife and daughter are staying at the Spanish ambassador’s residence in Caracas.
“Spain has no intention of handing him over,” the Spanish daily El Mundo quoted the Foreign Ministry in Madrid as saying.
“Spain trusts the Venezuelan authorities will respect the inviolability of the residence of the Spanish ambassador,” government sources said.
However Lopez has no intention of seeking asylum in Spain and leaving Venezuela, El Mundo quoted his wife, Lilian Tintori, as saying.
“I’m not afraid of prison,” Lopez told journalists outside the ambassador’s residence, adding that he expected President Nicolas Maduro to be ousted within weeks.
Venezuelan police and intelligence agents have been posted near the embassy, El Mundo reported.
Lopez appeared on Tuesday alongside self-declared interim president Juan Guaido, who is trying to topple Maduro and who said he had won over part of the army.
Lopez said soldiers who supported Guaido had released him from house arrest.
He said on Thursday he had met with high-ranking army officers at his home and there would be “more movements from the military sector” towards the opposition.
Lopez was sentenced in 2015 to 14 years prison for incitement to violence, but later allowed to serve his sentence under house arrest.
Maduro accuses Guaido of attempting a coup and has vowed to jail those involved.
The president attended a massive military rally in Caracas on Thursday, calling on the army to remain united and “defeat coup attempts by traitors who sell themselves for dollars to Washington”.
Defence Minister Vladimir Padrino said the army was reaffirming its loyalty “to the fatherland, to the constitution … and to the constitutional president”.
The military rally, which brought together 4500 soldiers, took place one day after opposition supporters clashed with security forces around the country.
Four people were killed during two days of protests, the non-governmental organisation Venezuelan Observatory of Social Conflicts said.
About 130 people were injured by bullets, rubber bullets and tear gas nationwide.
Want to comment?
Send us an email, making it clear which story you’re commenting on and including your full name (required for publication) and phone number (only for verification purposes). Please put “Reader views” in the subject.
We’ll publish the best comments in a regular “Reader Views” post. Your comments can be brief, or we can accept up to 350 words, or thereabouts.
InDaily has changed the way we receive comments. Go here for an explanation.
Make your contribution to independent news
A donation of any size to InDaily goes directly to helping our journalists uncover the facts. South Australia needs more than one voice to guide it forward, and we’d truly appreciate your contribution. Please click below to donate to InDaily.