Carles Puigdemont is congratulated by the acting Catalan president, Artur Mas, front left, as he arrives for the investiture debate.
Catalan parties agree on new regional head to replace Artur Mas, piling pressure on Spain's PM Mariano Rajoy to ally with Socialists to block separatists. Pro-independence activists demonstrate at the Catalan parliament as Carles Puigdemont, mayor of Girona, was chosen as regional president.
Catalonia's parliament is due to swear in a new separatist leader, putting the pro-independence movement's resolve to break with Spain over the next 18 months back on track after months of political deadlock.
The 11th-hour decision on Sunday evening played into a fraught national political scene since an inconclusive election last month in which the ruling People's party (PP) won most seats but lost its parliamentary majority.
The country has been in stalemate since then.
Artur Mas, the president of the regional assembly from the 2010 election and acting head, stepped down on Saturday after a regional election in September left Catalonia's pro-independence parties split on whether to endorse him as their leader. Catalonia's parties had until Monday to agree on a new leader or new regional elections would have had to be called.
Catalonia plunged into uncertainty as leftwing CUP rejects Mas
Mas will be replaced by Carles Puigdemont, the mayor of Girona, as head of a majority separatist Catalan parliament that will restart the push for a unilateral declaration of independence.
Under the separatist's 18-month "roadmap", Catalan authorities will approve their own constitution and begin building institutions necessary for an independent state such as an army, central bank and judicial system.
Such a plan faces fierce opposition from Spain's central government under the PP, which refused to allow a referendum in Catalonia in 2014, arguing it would contravene Spain's constitution.
The resurgence of a unified independence movement increases pressure on the acting prime minister, Mariano Rajoy, and his Socialist rivals to bury their differences and form a German-style "grand coalition" in Madrid to thwart the Catalan parties.
A senior official of Rajoy's PP said on Sunday that a coalition with more than 200 parliamentarians would be the best response to what he called the challenge to Spain's sovereignty.
"Now there are no excuses," Fernando Martínez-Maillo told a news conference. "When the new legislature opens next Wednesday, we should reach an agreement among us all to form the broadest government possible of the main parties – the People's party, the Socialists, and also, logically, [newcomer centrists] Ciudadanos, to, among other things, defend Spain's unity."
Spain's constitutional court has already struck down a resolution for independence by the Catalan regional assembly in November, saying it did not have the legal and political legitimacy to violate the constitutional order.
Opposition groups also point to polls that show a majority of people in Catalonia, a north-eastern region of 7.5 million people with its own distinct language and culture, say they want to remain part of Spain but with greater autonomy on issues such as tax.
The agreement between Junts pel Sí (Together for Yes), a coalition of the centre-right Democratic Convergence of Catalonia (CDC) party and leftist Republican Left of Catalonia (ERC) party, and the far-left minority partner Popular Unity Candidacy (CUP) gives the separatist bloc a slim majority in the 135-seat Catalan parliament.
On top of Junts pel Sí's 62 seats, the CUP will add two seats of its own and its other eight delegates agreed not to oppose the government on issues of independence.
CUP had opposed Mas's bid for another term due to deep differences over such issues as an independent Catalonia's membership of Nato and the European Union.
Mas's replacement, Puigdemont, is a conservative mayor of the Catalan city of Girona and cut from the same cloth as Mas. In a swipe at the central government in Madrid, the newspaper El País quoted him saying he wants to "chase the invaders out of Catalonia".
Centre party Ciudadanos throws Spanish election results into question
Antonio Barroso, an analyst at Teneo Intelligence, said Mas's departure would lead to a radicalisation of the pro-independence movement, given Puigdemont's attachment to a more separatist strand of the CDC party.
"The deal means that Catalonia is likely to accelerate its secessionist challenge in the ongoing game of chicken with the central government," he said.
Meanwhile, the national political parties are manoeuvring for position, with a variety of coalitions possible. Some analysts also see a new national election as inevitable.
The Socialist party (PSOE), whose leader, Pedro Sánchez, has previously rejected the idea of a grand coalition, said on Sunday that he supported PP efforts to defend national unity, but he made no further commitment.
Sánchez, whose party came second in the election, said he would prefer a coalition of the left. However, the situation is complicated by the fact that the left-wing Podemos party has said it supports a referendum on Catalan independence, which the Socialists reject.