The government “does not envisage in any circumstances handing over Leopoldo Lopez to the Venezuelan authorities nor asking him to leave the ambassador's residence”, the Spanish foreign ministry said in a statement.
Lopez emerged on Tuesday from two years of house arrest to join opposition leader Juan Guaido at a demonstration as the National Assembly president tried to incite a military uprising against Venezuelan President Nicolas Maduro.
Later that day, Lopez sought refuge in the Chilean embassy with his wife and daughter before moving to the Spanish embassy.
Lopez was first arrested in 2014 and accused of inciting violent protests against the government. He was handed a nearly 14-year sentence in 2015 and then transferred to house arrest in 2017.
Madrid published the statement following a meeting between the Spanish ambassador and Venezuela's Foreign Minister Jorge Arreaza.
It said that Spain wanted to “find a solution as quickly as possible” but stressed that, under international law, diplomatic residences were inviolable.
Lopez's wife Lilian Tintori claimed on Twitter on Wednesday that their house had been robbed and ransacked while they were away.
In statements made at the Spanish ambassador's residence on Thursday, Lopez said that the attempted uprising was “part of a process — it's a crack that will become a bigger crack… that will end up breaking the dam.”