Catalonia's parliament swore in a new separatist leader this evening, putting the pro-independence movement's commitment to break with Spain over the next 18 months back on track after a long political deadlock.
The 11th hour decision played into a fraught national political scene since an inconclusive election last month in which Spain's ruling People's Party won the most seats but lost its parliamentary majority.
The country has been in stalemate since then.
After months of tense negotiations between Catalan parties over a leader who could unite the pro-independence movement, Carles Puigdemont, mayor of Girona, replaced Artur Mas as head of a majority separatist Catalan parliament, which will now restart the push for a unilateral split with Spain.
Catalonia's parties had until tomorrow to agree on a new leader or new regional elections would have had to be called.
Under the separatists' 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.
"We begin an extremely important process, unparalleled in our recent history, to create the Catalonia that we want, to collectively build a new country," Mr Puigdemont told the Catalan parliament.
He said Catalonia would need to negotiate with the Spanish state, the European Union and the international community to achieve such a goal.
His plan faces fierce opposition from Spain's central government under the People's Party, which refused to allow a referendum in Catalonia in 2014, arguing it would contravene Spain's constitution.
Acting Spanish Prime Minister Mariano Rajoy said he would block any unilateral move from the new Catalan government and had instructed all government officials to enforce the law.
"I will defend and preserve democracy all over Spain. I will defend the sovereignty of the Spanish people," he said.
Mr Rajoy said he had received the backing of Socialist party leader Pedro Sanchez and newcomer centrist party Ciudadanos' leader Albert Rivera, having spoken to both this afternoon.