Catalonia's separatist leader has accused the Spanish government of carrying out the 'worst attacks' on its population since the Franco dictatorship, as nearly half a million people took to the streets at a huge rally.

Regional President Carles Puigdemont said the people will not accept the unprecedented step by the Prime Minister to dissolve its government as the country's deepest political crisis in decades deepens.

He spoke as an estimated 450,000 people vented their fury at a huge pro-independence protest in Barcelona.

Activists waved the Catalonian independence flag as tempers boiled over after Spanish Prime Minister Mariano Rajoy's bombshell earlier today.

It had earlier emerged that Puigdemont, who faces being removed from office under Rajoy's plan, could be arrested if he declares independence, and Madrid now plans to hold Catalan regional elections in January.

Catalan President Carles Puigdemont joined the protest, after it emerged he could face arrest if he declares independence
People waved independent Catalonia flags at the rally

In a scathing speech, he likened Rajoy's actions to those of Francisco Franco, the dictator who ruled Spain with an iron fist between 1939 and 1975.

Franco abolished Catalonia's regional government in 1939.

He said Rajoy's attempt to 'humiliate' Catalonia is an 'attack on democracy', and made a veiled independence threat, telling politicians to counter Spain's planned takeover.

Puigdemont branded Madrid's measures 'illegal' and said the move to fire the regional government and force a new election was "the worst attack against the institutions and the people of Catalonia since the military
dictatorship of Francisco Franco."

An estimated 450,000 people took part in today's rally in Barcelona, authorities have said
Protesters waved Catalan separatist flags at today's rally in Barcelona

In a televised speech he said: "I ask the parliament to meet in a plenary session during which we, the representatives of the citizens' sovereignty, will be able to decide over this attempt to liquidate our government and our democracy and act in consequence."

Pro-independence supporters have been incensed by the imprisonment of two of the movement's leaders, Jordi Sanchez and Jordi Cuixar.

Today's drama comes after Puigdemont threatened to go forward with Catalan independence, which has incensed the Prime Minister.

Mr Puigdemont joined the protests in the region's capital and Rajoy's announcement was met with fury by angry crowds chanting anti-government slogans.

Rajoy said after a cabinet meeting that the central government needs to take the unprecedented step of assuming control of Catalonia to ''restore order" in the face of a secession effort backed by the regional government.

It happened as Spain's Prime Minister threatened to dissolve the regional government
The crisis has deepened since a referendum on October 1

He is proposing that the powers of Catalan officials are taken over by central government ministers in an unprecedented move.

A vote is scheduled in the Spanish Parliament on October 27, with Rajoy saying it is needed in order to restore order.

Rajoy's government is activating a previously untapped constitutional article to take control of Catalonia.

This is aimed at blocking the independence movement that has gained pace since a disputed October 1 referendum on separating Catalonia from Spain.

Spanish authorities have come under fire after a strong-armed police response, which saw officers attempt to block people from voting.

The huge protest came after it emerged that the head of the regional government could face arrest if he declares independence
Angry protesters wore the region's flag as tens of thousands took to the streets of Barcelona
The huge protest was held as feelings boil over and the crisis deepens

Spain's most senior court fell victim to a massive cyber attack as hackers launched an "Operation Free Catalonia" campaign.

The country's constitutional court said unknown hackers had accessed its computer systems on Friday.

The Spanish National Security Department said the hack was part of a recent campaign to flood government websites with slogans in support of independence for the Spanish region of Catalonia .

Social media groups linked to cyber hacking group Anonymous said they would roll out action as part of "Operation Free Catalonia".

Catalan regional president Carles Puigdemon is among those at the protest today
Authorities in Catalonia have said the population voted overwhelmingly in favour of independence

Meanwhile, Spanish attorney general José Manuel Maza is reportedly preparing to have Carles Puigdemont - president of Catalonia and figurehead of the independence movement - arrested for rebellion.

El Pais reported Puigdemont faces a charge of sedition, punishable by up to 30 years in prison, if he formally declares independence or tries to change the Spanish constitution.

It comes after the regional leaders of Catalonia - including Barcelona - held an independence referendum earlier this month on whether to break away from the rest of Spain.