Spanish Prime Minister Mariano Rajoy has fired the Catalan government as part of emergency measures the Senate approved following the declaration of independence.

Mr Rajoy said he is dissolving the Catalan parliament and calling for a new election on December 21.

He was speaking after a special Cabinet meeting to discuss what measures to take in the wake of the Catalan parliament's announcement of secession earlier on Friday.

READ MORE: Scottish ministers: We understand and respect position of Catalan Government

The firing of the leaders is likely to meet with fierce opposition in Catalonia, where thousands have been celebrating the independence declaration.

The Spanish government has been authorised to dismiss the country's government and curtail the Catalan parliament's powers.

Mr Rajoy said he is also firing the head of the Catalan police, shutting down Catalonia's foreign affairs department and dismissing its delegates in Brussels and Madrid.

He said "we never wanted to come to this point" and the aim is "to return (Catalonia) to normality and legality as soon as possible".

In a square outside the government palace in Barcelona, an announcer told the crowd about the moves by Mr Rajoy.

READ MORE: Scottish ministers: We understand and respect position of Catalan Government

The news was greeted with loud jeers and whistles.

But the thousands who came to celebrate Catalonia's independence declaration did not let the Spanish response disrupt the festive mood.

A band took to the stage immediately after the announcement and the crowd once more began singing and dancing to the music.

The crowd in Sant Jaume Square shouted "we are not moving".