Lawmakers in Catalonia officially started a process Monday to secede from Spain by 2017 in an unprecedented showdown with Madrid, after a parliamentary majority voted for a pro-independence resolution.
The text calls on the regional assembly to start working on legislation to create a separate social security system and treasury, with a view to complete independence within 18 months - a move that Rajoy immediately challenged.
"Having seen that its discourse on economic recovery isn't working, the (ruling) Popular Party is resorting to plan B - focusing on 'Spain that is breaking up'," said politics professor Anton Losada.
Threat from within?
In a direct challenge to Spain's central government, the resolution states that the parliament in Catalonia - one of the country's 17 semi-autonomous regions - is "sovereign".
Catalonia, a region of 7.5 million people with its own language that accounts for a fifth of Spain's economic output, already enjoys huge autonomy in education, health and policing.
But it demands even greater powers, particularly where taxation is concerned, estimating that it gives more to the central government than it receives.
Responding to the resolution, Rajoy said his government would go to the Constitutional Court, which can suspend the text and take sanctions against those who do not respect its ruling.
But those who crafted the declaration had anticipated this and the resolution states that the secession process will not be subject to any decision made by Spanish institutions, including the court.
Rajoy can also invoke article 155 of the Spanish constitution, which allows Madrid to supersede the authority of a regional government that is acting outside the law, and go as far as cut off its funding.
But ultimately, the separatist camp itself could become its own worst enemy.
After September regional elections that saw pro-independence parties win a majority of seats in the local parliament - 72 out of 135 - they have yet to agree on who they want to lead Catalonia towards independence.
The regional parliament failed in its first attempt to elect a regional president on Tuesday, delivering a blow to Artur Mas, Catalonia's current head of government, who was hoping for re-election.
The CUP - the smaller, far-left separatist party - refused to support Mas as president in the first round of voting on Tuesday evening, calling instead for an independent candidate untainted by corruption and austerity cuts to lead Catalonia towards independence.
As Raul Romeva of the Together for Yes coalition, and preferred presidential candidate of the CUP, said on Tuesday: "As long as there is no government, we will not be able to implement the measures we approved yesterday."
Catalan left-wing daily El Periodico complained that the separatists "are leading the country towards a precipice and they are not even capable of choosing the driver."
Rajoy may benefit
Lawmakers in Catalonia have until January 9th to agree on who they want to lead the region, but meanwhile, time is ticking along and the December 20th general elections are looming.
Rajoy, often criticised for not offering any solutions to this crisis, has managed to garner the support of the country's main opposition Socialists and new, increasingly popular centre-right party Ciudadanos over the issue.
"In crisis situations, voters tend to cast their ballot for the government currently in place," said political analyst Jose Ignacio Torreblanca.
"Particularly if you manage to increase participation thanks to the sensation that this is a very important election, that there is a threat or a risk to the constitution."
But he underlined that it was under Rajoy's mandate that "nearly half of new separatist voters emerged".
Historian Carlos Gil Andres said that the prime minister was emerging as a figure of stability at a time of strong nationalistic sentiment.
And he added that other crucial issues, such as the actual content of policies, corruption and austerity were "disappearing from the political debate".
By Michaela Cancela-Kieffer