A German court ruled Thursday that Catalan separatist leader Carles Puigdemont cannot be extradited to Spain on charges of revolution and can be freed from a German jail on bail.
Puigdemont supporters say they expect Catalonia's former president to be out of jail by Friday morning.
The judges in Schleswig in northern Germany based their ruling on German law, saying while rebellion may be a crime in Spain, it is not a criminal offense in Germany.
The judges also ruled Puigdemont could still be extradited to Spain on charges of embezzling public funds not rebellion, but could only be tried for embezzlement if he is sent back.
If Puigdemont posts bail, he can only leave Germany with prosecutors' permission, inform them when he changes his address, and must report to police once a week.
Pro-independence Catalans celebrated when they heard the German court's decision and some cried openly.
Spanish officials and the country's supreme court have not yet commented on the German ruling.
German police arrested Puigdemont on a Spanish warrant last week. He crossed into Germany from Belgium, where he fled on October to avoid arrest.
He is wanted in Spain on charges of inciting rebellion by defying the central government and going ahead with a Catalan independence referendum in October, leading to a violent police crackdown.
Twenty-four other Catalan separatist leaders are also facing rebellion charges.
Pro-independence lawmakers won a slim majority in December's parliamentary elections in Catalonia. But parliament has been unable to name a new president since Puigdemont fled, and the future of independence is murky.
Catalonia, in northeast Spain, and its capital Barcelona are major tourist destinations. It has its own language and distinct culture. But the separatist crisis has hurt tourism and the regional economy.
Catalan separatists call the region a powerful economic engine that drives Spain, and they have demanded more autonomy.
Those who want to stay united with Spain fear the region will sink into an economic abyss without the central government, its ties to the European Union, and its numerous existing bilateral relations.
This story was written by VOA News.