FILE - In this May 15, 2018 file photo former Catalan leader, Carles Puigdemont, addresses the media during a news conference in Berlin, Germany. A German court on Thursday, July 12, 2018 decided that he can be extradited to Spain on breach of trust charges but denied the extradition on charges of rebellion. (AP Photo/Markus Schreiber, file)

Catalonia's deposed leader Carles Puigdemont said Thursday he and other separatists would "fight until the end" after a German court decided to allow his extradition, but not on the severe charge of rebellion demanded by a Spanish judge.

"We will fight to the end, and we will win," tweeted Puigdemont who is wanted by Spain over his role in Catalonia's failed independence bid in October.

The court in Schleswig-Holstein gave its green light to the extradition of the 55-year-old for misuse of public funds but not rebellion, which carries up to 25 years in jail.

German prosecutors must now decide whether to transfer him to Spain.

If Puigdemont is extradited, the Supreme Court in charge of the case will not be able to try him for rebellion which would be a severe setback for Spain.

Puigdemont is one of 13 separatist leaders accused of rebellion, four of whom are in self-exile in various European countries.

The other nine are in custody in Spain awaiting trial.

They could argue that given Puigdemont, who was Catalonia's president, cannot be tried for rebellion, then neither can they.

"We have defeated the main lie sustained by the state," Puigdemont tweeted.

"The German justice system denies that the referendum on October 1 was rebellion," he said, referring to the independence vote that went ahead despite a court ban and was marred by police violence.

"Every minute that our companions spend in prison is a minute of shame and injustice."

Catalonia's current separatist President Quim Torra, who is close to Puigdemont, tweeted that "once more the machinations and lies of a judicial case that never should have started have come to light."

"We will win in Europe."