Carles Puigdemont had been living in self-imposed exile in Belgium since he fled Spain five months ago. (Virginia Mayo/AP)

Authorities in Germany detained former Catalan president Carles Puigdemont on Sunday after he crossed into the country from Denmark, setting up a possible extradition of the separatist leader to Spain. 

Puigdemont’s attorney announced the detention on Twitter and said his client had been taken to a police station. German police confirmed in a statement that Puigdemont had been taken into custody at 11:19 a.m. Sunday by highway patrol officers in Schleswig-Holstein, a state that borders Denmark.

German deputy state prosecutor Ralph Doepper, who is based in the northern town of Schleswig, told news media that Puigdemont would appear in court Monday for a procedural hearing and that a higher regional court would decide later whether to keep him in custody pending a Spanish extradition request. 

Doepper said authorities had been tipped off that Puigdemont would be entering Germany, and multiple German media outlets reported that Spanish intelligence had been used to snare the ardent Catalan nationalist.

In Barcelona, tens of thousands of pro-independence Catalans gathered to protest the detention, leading to clashes with riot police, the Associated Press reported. Protesters also turned out in the northern city of Girona, where Puigdemont was mayor before he became regional president in 2016, and other towns in the north.

Sunday’s development was the latest in a series of maneuvers that have left Catalonia’s independence movement with few leaders who are not either being held in custody or sought as fugitives.

Puigdemont is wanted in Spain on charges of rebellion and sedition arising from his role in organizing an October referendum on Catalan independence. If convicted, he could face as many as 30 years in prison.

The Catalan leader has been living in self-imposed exile in Belgium since he fled Spain five months ago amid the uproar over the referendum. Separatists won that vote, and Puigdemont’s government declared independence. But the Spanish government deemed the ballot unconstitutional and imposed direct rule.  

Spain had reactivated an international arrest warrant for Puigdemont on Friday. At the time, he was in Finland. But his attorney, Jaume Alonso-Cuevillas, said Saturday that Puigdemont had left Finland and was en route to Belgium. 

Puigdemont’s attorney said that German police have been following proper procedures since the detention and that his client had intended upon his return to Brussels to “put himself, as always, at the disposal of the Belgian justice system.” 

The detention comes at a tense moment in Catalonia. Separatists hold a majority in the regional parliament in the wake of elections in December. But they have not been able to form a government and have abandoned plans to name a new president after the arrest of their latest candidate, Jordi Turull.

Puigdemont had sought to reclaim the presidency for himself but abandoned that bid on March 1, announcing in a 13-minute video that he had come to the decision with “the greatest sadness.” 

But he also said he would set up a foundation that had the makings of a government in exile.

“I will not throw in the towel. I will not quit. I will not give up in the face of the illegitimate behavior of those who lost at the ballot box,” he said.

That message was in contrast to the one he had communicated privately to a colleague in messages that were captured by a TV camera and that acknowledged that the Spanish government’s crackdown “has won.”

“I guess that you’ve realized that this is over,” reads one of the messages.

Puigdemont is not the only separatist leader being sought by Spain. On Friday, the country issued five other international arrest warrants, including for four former Catalan ministers also believed to be in Belgium. 

The warrants came as the Spanish Supreme Court ruled that 25 Catalan leaders should face charges of rebellion, sedition or embezzlement.