Carles Puigdemont, the former Catalan president who is wanted in Spain on sedition charges, was detained in Germany on Sunday after he crossed into the country from Denmark, according to his lawyer.

The lawyer, Jaume Alonso-Cuevillas, said in a post on Twitter that Mr. Puigdemont had been headed to Belgium from Finland by vehicle when he was detained by the German police on an international arrest warrant.

The German news agency D.P.A. reported that the criminal investigation office of the northern German state of Schleswig-Holstein had confirmed Mr. Puigdemont’s arrest, according to The Associated Press.

Mr. Puigdemont had been living in self-imposed exile in Belgium since he led a banned referendum in October that backed Catalonia’s unilateral secession from Spain.

This month, a Spanish Supreme Court judge, Pablo Llarena, issued international arrest warrants for six Catalan politicians, including Mr. Puigdemont, and ordered five other Catalan politicians to be detained without bail.

The decision reignited tensions in the region as the central Spanish government struggled to quell the secessionist movement in Catalonia, a wealthy northeastern region.

On Saturday, the authorities in Finland said they had received the warrant for his detention issued by Spain. But the Finnish police said in a statement that they had no knowledge of his whereabouts.

Mr. Puigdemont, who had become the embodiment of Catalonia’s aspirations for independence, earlier announced he was giving up his efforts to be reappointed as the region’s president.

If he returns to Spain, Mr. Puigdemont could face up to 25 years in prison on charges of rebellion and sedition for his part in organizing the illegal referendum on secession.