A German court on Thursday refused Spain's request to extradite Catalan ex-leader Carles Puigdemont on a rebellion charge following his arrest in Germany last month, ordering his release on bail pending a hearing on a lesser charge.
In a heavy blow for Madrid, judges at the upper state court in Schleswig-Holstein "believe that in regard to the allegation of rebellion, extradition is illegal" as Puigdemont was not personally involved in violence during a referendum on Catalan independence last October.
That made his actions not punishable under German law, the judges said in a statement, rejecting prosecutors' argument that the Spanish "rebellion" charge was similar enough to Germany's "high treason" statute to justify an extradition.
The Catalan separatist figurehead could still be extradited on a charge of misusing public funds, the judges added, although "further facts must be clarified and information gathered" in the coming days and weeks.
But meanwhile Puigdemont can leave custody if he fulfils court-imposed conditions including a payment of 75,000 euros ($92,000).
Regional newspaper Neue Osnabruecker Zeitung reported that the politician would also have to report to the police every week and would not be allowed to leave Germany without prosecutors' consent.
A spokesman at the Neumuenster prison where Puigdemont has been held since March 25 said he would not be released before Friday morning.
"See you tomorrow. Thank you very much to everybody!" read a tweet posted from Puigdemont's account late Thursday.
Puigdemont's German defence team welcomed the court's decision to set aside the "outrageous" charge of rebellion in a statement.
They "respected" judges' decision to ask for more information from Spain on the misuse of funds charge in a "case with trend-setting signficance for the European understanding of democracy," they added.
"[Puigdemont] always said that he had full confidence in the German judiciary," his Barcelona-based lawyer Jaime Alonso-Cuevillas tweeted.
A Spanish government source told AFP that Madrid "always respects" judicial decisions "whether they please it or not".
"The government is sure that Spain's justice system will take the appropriate measures given these new circumstances, to ensure respect for the laws of our country," the source added.
If extradited only on the charge of misusing public funds, Puigdemont cannot be prosecuted in Spain on the more serious charge of rebellion.
There is no such offence on German law books, although prosecutors had argued that it could be seen as roughly equivalent to the crime of "high treason".
The misuse of public funds charge relates to the cost of the Catalan independence referendum, estimated at 1.6 million euros by Madrid.
News of Puigdemont's bail "will reduce tension and pressure in Catalonia" where protestors have blocked streets and clashed with police in recent days, political scientist Oriol Bartomeus of the Autonomous University of Barcelona told AFP.
But the relief would only be "momentary", he added, noting that "nothing has been resolved" by Thursday's decision.
Puigdemont's lawyers have appealed in Spain against the "rebellion" charge, highlighting that he was not involved in violence.
Public opinion in Spain is divided on whether the referendum constituted a "violent uprising" as described in the law.
Catalans mostly reject the rebellion charges, according to opinion polls, with a major demonstration calling for imprisoned separatist leaders to be freed planned for April 15 in Barcelona.
After being removed from office by the central government in Madrid following a unilateral declaration of independence on October 27, Puigdemont fled to Belgium.
He was arrested in northern Germany in late March on the way back from a trip to Finland.
Puigdemont and six political allies escaped Spanish authorities in an attempt to "internationalise" their plight by dragging other European Union countries into the row.
Nine other pro-independence figures are currently in custody, including six members of Puigdemont's Catalan government and the former president of the Catalan parliament.