MADRID - Spanish Prime Minister Mariano Rajoy vowed Thursday to take legal action to block an independence referendum in Catalonia which he branded an "intolerable act of disobedience".

Rajoy gathered his cabinet for an emergency meeting to formally ask Spain's Constitutional Court to once again rule against the plebiscite called for October 1.

He also said all municipalities in Catalonia would be warned over their "obligation to impede or paralyse" efforts to carry out the vote which he said is unconstitutional.

Catalonia's regional parliament, which is controlled by separatists, voted late on Wednesday to push ahead with the referendum in the wealthy northeastern region which includes Barcelona, sparking the country's deepest political crisis in 40 years. The Catalan parliament will also meet again later Thursday to examine a "transition law" laying out how the region would function if the majority of its 7.5 million inhabitants vote in favour of seceding from Spain.

Spain's top prosecutor meanwhile said "criminal charges are being prepared" against the leaders of the Catalan parliament as well as officials in the regional government who prepared the referendum decree and that voting materials would be seized. General prosecutor Jose Manuel Maza told reporters the officials could be charged, among other things, with disobedience, abuse of power and embezzlement.

Maza added that regional prosecutors, assisted by police, had been told to investigate any actions taken to organise the vote.

The warnings were brushed aside by a Catalan government spokesman, who insisted the referendum would take place despite a "covert state of siege" being imposed by the central government in Madrid.

"Whether it's snowy or windy, we will do it because we have a contract with the citizens of Catalonia," Jordi Turull said.

"This does nothing to alter the government's project," he added. "Faced with this covert state of siege, we now feel obliged to defend our most fundamental rights."

Catalonia's president Carles Puigdemont, a lifelong proponent on independence, is hoping to mobilise supporters in a show of legitimacy in the face of Madrid's threats to halt the vote by any means possible.

Tens of thousands of Catalans are expected to take to the streets of Barcelona on Monday, Catalonia's national day, to push for independence as they have in previous years on this date. The looming showdown was set up late Wednesday after lawmakers approved the referendum with 72 votes in favour and 11 abstentions after 12 hours of often stormy debate in the regional assembly.

After the law was passed, separatist lawmakers sang the Catalan anthem, "Els Segadors", which recalls a 1640 revolt in the region against the Spanish monarchy.

In a tweet Wednesday, Catalan parliament president Carme Forcadell said she had requested that the 12 judges at the Constitutional Court be disqualified, calling them "another extension of the state which has lost all legitimacy".

Most of the court's judges have been nominated by lawmakers from Rajoy's Popular Party. The court on Thursday dismissed her request. Catalonia accounts for about one-fifth of Spain's economic output, and already has significant powers over matters such as education and healthcare.

But Spain's economic worries, coupled with a perception that the region pays more in taxes than it receives in investments and transfers from Madrid, have helped push the cause of secession from the fringes of Catalan politics to centre stage.

Adding to the rise in separatist sentiment was a 2010 ruling by the Constitutional Court striking down parts of a 2006 autonomy charter which granted new powers to Catalonia and recognised it as "a nation".

Opinion polls show that Catalans are evenly divided on independence. But over 70 percent want a referendum to take place to settle the matter, similar to the plebiscite held in Scotland in 2014.