Spain's former Catalan leader Carles Puigdemont will be released under conditions, a German regional court announced on Thursday.
Extradition proceedings on the corruption charges will continue.
"Puigdemont's Barcelona-based lawyer Jaime Alonso-Cuevillas tweeted: "[Puigdemont] always said that he had full confidence in the German judiciary".
Judges will consider Puigdemont's extradition on the less serious charge of misusing public funds, meaning that he only could face trial for that if he were returned to Spain. Puigdemont is being freed because he has been deemed much less of a flight risk, now that rebellion has been ruled out, the court said.
Puigdemont was caught on the entry of Germany from Denmark on March 25 en route to his residence in Belgium.
Disney To Launch $5 Monthly ESPN+ Streaming Service On April 12
Dubbed ESPN +, the subscription service will feature live sporting events, original shows and on-demand programming. NHL - One free game per day (again local blackouts apply) with the NHL .TV package available for purchase .
But in a blow to the Spanish probe, a northern German state court ruled Thursday that the lack of violence in the Catalan independence bid meant that Puigdemont can't be punished for rebellion under German law.
The misuse of public funds charge relates to the cost of the Catalan independence referendum, estimated at 1.6 million euros by Madrid.
The official, who spoke under customary anonymity, said "Spanish justice will adopt the appropriate measures in the face of these new circumstances".
Spain's Constitutional Court established past year that Catalonia's referendum and subsequent declaration of independence were unconstitutional.
Judge Carmen Lamela of the National Court, which deals with high-profile political and financial cases, said in her ruling there was evidence that former Mossos d'Esquadra chief Josep Lluis Trapero was part of a "criminal organisation" that sought to break Catalonia away from Spain. But he then came under severe pressure when Spanish national authorities asked his regional police force to help prevent the October 1 referendum, which triggered Spain's worst political crisis in decades.