Protests have broken out across Catalonia as former leader Carles Puigdemont spends the night in a German prison.

Mr Puigdemont, who is wanted in Spain for sedition and rebellion, was detained by German police acting on a European arrest warrant.

Thousands of his supporters have turned out in Barcelona and other nearby cities to protest his arrest.

Mr Puigdemont will appear before a German judge on Monday.

He was detained while crossing from Denmark on his way to Belgium, where he has been living in self-imposed exile since Catalonia's parliament unilaterally declared independence from Spain in October.

Who is protesting?

In central Barcelona, protesters chanted "Freedom for the political prisoners" and "This Europe is shameful!" as they headed to the offices of the European Commission and the German consulate.

Spanish news agency Efe estimated crowds of 55,000 in the centre of the city.

It also reported 17 people injured and three arrests.

Smaller demonstrations were held in Girona, where Mr Puigdemont once served as mayor, Tarragona and Lleida. Some protesters also formed road blocks in various locations.

Tensions in Catalonia are very high and its separatist leaders abandoned plans to name a new president after the arrest on Friday of the latest candidate, Jordi Turull, sparked protests in Barcelona.

Spain's Supreme Court has ruled 25 that Catalan leaders should be tried for rebellion, embezzlement or disobeying the state. They all deny the allegations.

How was Carles Puigdemont caught?

German police said that Mr Puigdemont was detained by a highway patrol in the northern state of Schleswig-Holstein, which borders Denmark.

He had been on a trip to Finland to meet lawmakers and attend a conference last week when the arrest warrant against him was reissued, taking him by surprise.

He slipped out of Finland before the authorities could arrest him but only got as far as Germany before being intercepted.

His spokesman, Joan Maria Pique, said had been heading to Belgium "to put himself, as always, at the disposal of Belgian justice".

International warrants for Mr Puigdemont and other Catalan leaders were withdrawn in December by a Spanish judge, who said they had shown a willingness to return to the country.

What happens next?

Mr Puigdemont is spending the night in a prison in the north German town of Neumuenster.

His court appearance on Monday will be a formality to confirm his identity. Afterwards a decision will be made about whether he will remain in custody while the extradition order is being processed.

The charges he faces in Spain could result in up to 30 years in prison.

Spain's latest move is considered the most serious challenge to date to the Catalan independence movement. Almost the entire leadership now faces a major legal fight.

Various other Catalan politicians have been subjected to new warrants, including Catalonia's former education minister, Clara Ponsati. She is in Scotland, where she has a position at the University of St Andrews, and is preparing to hand herself in.

How we got here

1 October 2017: The independence referendum takes place in Catalonia; it is deemed illegal by Spain and boycotted by many potential voters

27 October: Catalonia's leaders declare independence, which leads to the Spanish government imposing direct rule on the region and dissolving its parliament

30 October: Charges of rebellion, sedition and misuse of public funds are brought against various sacked members of the Catalan government, including Mr Puigdemont

2 November: Several former Catalan ministers are taken into custody in Spain

3 November: European Arrest Warrants are issued against Mr Puigdemont and four of his allies, who have all fled to Belgium

5 December: A Spanish judge withdraws the European arrest warrants but says the group still face possible charges for sedition and rebellion

21 December: Carles Puigdemont is re-elected to parliament during Catalan's regional elections - which Spanish PM Mariano Rajoy had called to "restore democracy"

1 March 2018: Mr Puigdemont says he is stepping aside and he backs detained activist Jordi Sanchez to run as Catalonia's president

21 March: Mr Sanchez drops his leadership bid and instead the candidacy is passed to Jordi Turull, who the following day is rejected by hardline separatists

23 March: Mr Turull and various others are arrested in Spain, and the European arrest warrants are reissued

25 March: Mr Puigdemont is detained in Germany