BARCELONA/MADRID — The Madrid government sacked Catalonia's president and dismissed its parliament on Friday, hours after the region declared itself an independent nation in Spain's gravest political crisis since the return of democracy four decades ago.

A new regional election will be held in Catalonia on Dec. 21, Prime Minister Mariano Rajoy said in a televised address on a day of high drama.

As well as removing Carles Puigdemont as head of the autonomous region, he also fired its police chief and said central government ministries would take over the Catalan administration.

"Spain is living through a sad day," Rajoy said. "We believe it is urgent to listen to Catalan citizens, to all of them, so that they can decide their future and nobody can act outside the law on their behalf."

As he spoke, thousands of independence supporters packed the Sant Jaume Square in front of the Catalan regional headquarters in Barcelona, their earlier joyful mood somewhat dampened by Rajoy's actions.

In a stunning show of defiance of Madrid, the Catalan parliament had voted in the afternoon to make a unilateral declaration of independence.

Despite the emotions and celebrations inside and outside the building, it was a futile gesture as shortly afterwards the Spanish Senate in Madrid approved the imposition of direct rule.

Several European countries, including France and Germany, and the United States also rejected the independence declaration and said they supported Rajoy's efforts to preserve Spain's unity.

#Catalonia is an integral part of #Spain & US supports Spanish govt’s constitutional measures to keep Spain united. https://t.co/GelQ4bKOfX — Department of State (@StateDept) October 27, 2017

The crisis has now reached a new and possibly dangerous level as independence supporters have called for a campaign of disobedience. Immediately after news of the vote, Spanish shares and bonds were sold off, reflecting business concern over the turmoil.

Alarm Around Europe

Catalonia held an independence referendum on Oct. 1 which was declared illegal by Madrid and marred by heavy-handed national police tactics to stop it.

Although the referendum endorsed independence, it drew only a 43 percent turnout as Catalans who oppose independence largely boycotted it.

The independence push has caused deep resentment around Spain. The chaos has also prompted a flight of business from Catalonia and alarmed European leaders who fear the crisis could fan separatist sentiment around the continent.

Catalonia is one of Spain's most prosperous regions and already has a high degree of autonomy. But it has a litany of historic grievances, exacerbated during the 1939-1975 Franco dictatorship, when its culture and politics were suppressed.

In Barcelona, Jordi Mercade, a 32-year-old engineer celebrating with friends, said he had mixed feelings about the day's events.

"It's a day for history but many of us here also know we are not independent. They have the force. We are proud to having declared independence but we know this is not something definitive."

It is not certain whether the new election can resolve the crisis, as it could increase the numbers of independence supporters in parliament.

Catalan President Carles Puigdemont sings the Catalan anthem on Friday alongside members of the Government and Pro-Independence MPs after the news that the Catalan Parliament voted in favor of independence from Spain in Barcelona, Spain. David Ramos / Getty Images

Also unclear is how Rajoy's other measures will work on the ground, because of the reactions of civil servants and the regional police, know as the Mossos d'Esquadra, who are reported to be divided in their loyalties.

The main secessionist group, the Catalan National Assembly, called on civil servants not to follow orders from the Spanish government and urged them to follow "peaceful resistance".

"Tensions are likely to rise significantly over the coming days," Antonio Barroso of Teneo Intelligence said in a note.

"Demonstrators might try to prevent the police from removing Catalan ministers from their offices if the central government decides to do so. This increases the risk of violent clashes with the police."

Short-Lived Liberty

A big crowd of independence supporters gathered outside the regional parliament in Barcelona, shouting "Liberty" in Catalan and singing traditional songs as the independence vote went through.

Among them was Monica Sanz, 44, a university lecturer who wore a Catalan flag around her neck.

"We tried all peaceful means. Moderate people have reached this point because it was impossible to make an agreement with Spain," she said.

The motion, passed after a passionate debate from advocates and opponents of independence, said Catalonia constituted an independent, sovereign and social democratic state.

Lawmakers from members of three national parties - the People's Party, the Socialists and Ciudadanos - walked out before the vote. Members of the pro-independence parties and the far-left Podemos then voted 70-10 in favour, in a secret ballot aimed at hindering any attempt by Madrid to lay criminal charges on them.

The soon-to-be-sacked Puigdemont left the chamber to shouts of "President!" and mayors who had come from outlying areas brandished their ceremonial batons and sang the Catalan anthem "Els Segadors" (The Reapers).

"Catalonia is and will be a land of freedom. In times of difficulty and in times of celebration. Now more than ever", Puigdemont said on Twitter.

But within an hour, the upper house of Spain's parliament in Madrid authorised Rajoy's government to rule Catalonia directly. Spain's constitutional court started a review of the vote for prosecutors to decide if its constituted rebellion.

In Brussels, the president of the European Council, Donald Tusk, said the independence vote changed nothing and the EU would only deal with the central government.