FILE - In this Dec. 21, 2017 file photo ousted Catalan leader Carles Puigdemont takes the podium at a gathering to watch the election results for Spain's Catalonia region at the Square Meeting Center in Brussels. The lawyer for fugitive former Catalan leader Carles Puigdemont says that he is being held by German police. Jaume Alonso-Cuevillas has confirmed to The Associated Press that German police stopped Puigdemont on Sunday, March 25, 2018 when he was crossing the border from Denmark. (AP Photo/Virginia Mayo,file)

FILE - In this Dec. 21, 2017 file photo ousted Catalan leader Carles Puigdemont takes the podium at a gathering to watch the election results for Spain's Catalonia region at the Square Meeting Center in Brussels. The lawyer for fugitive former Catalan leader Carles Puigdemont says that he is being held by German police. Jaume Alonso-Cuevillas has confirmed to The Associated Press that German police stopped Puigdemont on Sunday, March 25, 2018 when he was crossing the border from Denmark. (AP Photo/Virginia Mayo,file)

BARCELONA, Spain (AP) — Five months after going on the run from Spanish authorities, Catalonia’s former president was detained in Germany on an international warrant Sunday by highway police after the ardent separatist crossed the border with Denmark.

Carles Puigdemont’s capture, aided by Spanish intelligence services, sparked protests of tens of thousands in Catalonia’s main city of Barcelona and other towns in the wealthy northeastern corner of Spain. Some of the demonstrators clashed with riot police, leaving more than 50 civilians and police officers injured and leading to four arrests. Puigdemont will appear before a German judge on Monday.

ADVERTISEMENT

Spain was plunged into its worst political crisis in four decades when Puigdemont’s government flouted a court ban and held an ad-hoc referendum on independence for the northeastern region in October.

The Catalan parliament’s subsequent declaration of independence received no international recognition and provoked a takeover of the regional government by Spanish authorities that they say won’t be lifted until a new government that respects Spain’s Constitution is in place.

Spain’s state prosecutor office said it was in contact with its German counterparts to carry out its request to extradite Puigdemont to Spain, where he faces charges including rebellion that could put him in prison for up to 30 years.

In Barcelona, riot police shoved and struck protesters with batons to keep an angry crowd from advancing on the office of the Spanish government’s representative. Police vans showed stains of yellow paint reportedly thrown by protestors. Reinforcements were called in after several hours to clear the neighboring streets, with protestors tossing street barriers and burning two garbage bins as they retreated.

Outside the city center, groups of demonstrators cut off traffic on four different stretches of highways. Police also used batons to keep back a crowd of a few thousand who had gathered in front of the Spanish government’s representative in the city of Lleida.

German highway police stopped Puigdemont on Sunday morning near the A7 highway that leads into Germany from Denmark, police in the northern state of Schleswig-Holstein said.

German news agency dpa said that Puigdemont was taken to a prison in the northern town of Neumuenster. Dpa photos showed a van with tinted windows believed to be carrying Puigdemont as it arrived at the prison. Video footage also showed the same van leaving a police station in Schuby near the A7 highway.

ADVERTISEMENT

State prosecutors in Schleswig said that Puigdemont will appear in court Monday in the northern German town to confirm his identity. It said in a statement that “the question of whether Mr. Puigdemont has to be taken into extradition custody will then have to be determined by the higher regional court in Schleswig.”

German state prosecutor Ralph Doepper told RTL Television that Puigdemont has been “provisionally detained. He has not been arrested.”

“We are now examining the further procedure, i.e. tomorrow we will decide whether we will file a provisional application for detention with the competent district court, which could lead to extradition detention later on,” Doepper said.

A Spanish police official told The Associated Press under customary condition of anonymity that Spain’s National Center for Intelligence and police agents from its international cooperation division helped German police to locate Puigdemont.

A Spanish Supreme Court judge reactivated an international arrest warrant for Puigdemont on Friday when he was visiting Finland. Spain has also issued five warrants for other separatist who fled the country.

Ines Arrimadas, the leader of the pro-Spain Citizens party which has the most seats in Catalonia’s Parliament, said that the chaos on the streets was “of a society broken in two” by the secessionist movement.

Arrimadas said: “Puigdemont knew that fracturing Catalan society into two parts, spending public money on illegal activities, provoking a political and institutional crisis without precedents and confronting a 21st-century democracy of the European Union was going to have consequences.”

But the Catalan parliament speaker, the highest-ranking elected official in the region until it forms a government, made a televised address on Catalan public television to call for a united “democratic front” of political parties, labor unions and civil society organizations to respond to what he called “the thirst for revenge of the powers of the state.”

Speaker Roger Torrent accused Spain’s central authorities of “attacking the heart of democracy making a general cause against its political adversaries.”

Miquel Coca, a business owner in Barcelona, likewise vowed that the secession push wouldn’t falter.

“All the negative inputs that we have received help us to unite the society even more,” Coca said. “If we can’t have this leader, well, then there will be another. This is a movement of the people, not of one person.”

Polls show Catalonia’s 7.5 million residents are equally divided over secession, although a majority support holding a legal referendum on the issue.

Puigdemont, 55, is a former journalist and mayor of Girona who was thrust to the forefront of Catalonia’s independence push when he was handpicked by predecessor Artur Mas to become regional president in 2016. He withstood intense political pressure from Spanish Prime Minister Mariano Rajoy and Spain’s courts as he piloted the secession bid.

Spain had originally asked for Puigdemont’s extradition from Belgium after he fled there in October, but later withdrew the request until Spanish Supreme Court judge Pablo Llarena concluded his investigation this week. Llarena ruled that a total of 25 Catalan separatists would be tried for rebellion, embezzlement or disobedience.

In the meantime, Puigdemont was free to make trips to Denmark, Switzerland and Finland, as part of his effort to gain international support for the secessionist movement.

Puigdemont was also able to successfully run a campaign as the head of his “Together for Catalonia” bloc in a regional election in December in which separatist parties maintained their slim majority in Catalonia’s regional parliament.

All told, Puigdemont has become enemy No. 1 of Rajoy’s conservative government and Spain’s justice system.

He had wanted to be re-elected as Catalonia’s regional president — albeit while remaining abroad to avoid arrest — but eventually was stopped by a Spanish court.

Separatists in Catalonia are currently trying to elect a leader for the regional government before a two-month time limit is up and new elections are called.

Spain’s Constitution says the nation is “indivisible” and any changes to its top law must be made by its national parliament in Madrid.

Nine people who promote Catalan secession have been placed in pre-trial custody to prevent what Llarena considered a flight risk or intention to continue with independence efforts.

Also, Spain’s highest judicial authority condemned insults that appeared painted on the street near a house owned by Llarena in the Catalan town of Das. They called the Supreme Court judge a “fascist” and wrote the message that he is “not welcome in Das or anywhere.”

Scottish police said Sunday that the lawyer of Clara Ponsati, a former Catalan regional minister also being sought by Spain, had been in contact and is preparing to be handed over to authorities. She had moved to Scotland from Belgium earlier this month.

___

Kirsten Grieshaber reported from Berlin. Aritz Parra in Madrid, and Renata Brito in Barcelona, contributed to this report.

___

A previous version of this story corrected that Puigdemont was entering Germany, not Denmark.