Catalan separatist leader president Carles Puigdemont, right, is greeted by residents in the city of Girona on October 28, 2017 after Spain's central government imposed direct rule on the semi-autonomous Catalonia region. Eddy Kelele / AFP

Mariano Rajoy, Spain’s prime mini­s­ter, has appointed his deputy as Cat­­alonia’s president.

Soraya Saenz de Santamaria is charged with restoring order and law to the region but it is unclear if Carles Puigdemont, the separatist leader and sacked Catalan president, will refuse to step down.

Mr Puigdemont, the leader of the Catalan separatist movement, called on Saturday for his supporters to peacefully resist Madrid's takeover of their government following the regional parliament’s declaration of independence the day before.

In a pre-recorded televised statement, the sacked president said that “the best way to defend what we have achieved to date is democratic opposition to the application of article 155”.

He was referring to the constitutional provision, invoked within 40 minutes of the Catalan parliament voting for independence, that has allowed Madrid to impose direct rule.

Speaking from a podium bearing the emblem of Catalonia's government and in front of Catalan and EU flags, Mr Puigdemont did not look or sound like a man willing to accept the central government’s edict. “We will continue working to build a free country,” he defiantly told his countrymen.

Catalans woke up on Saturday to discover that the national government had taken control of the province, dismissing the regional government and senior members of the local police force, including its head, Josep Lluis Trapero.

In addition to dissolving the Catalan parliament, Spain’s prime minister Mariano Rajoy called for regional elections on December 21. “Spain is a serious country, it is a great nation and we are not prepared in any way to allow some people to liquidate our constitution,” Mr Rajoy said.

Mr Rajoy’s hardline stance has the support most foreign nations. The US state department said on Friday that “Catalonia is an integral part of Spain, and the United States supports the Spanish government’s constitutional measures to keep Spain strong and united”.

British prime minister Theresa May said “the UK does not and will not recognise the unilateral declaration of independence made by the Catalan regional parliament. It is based on a vote that was declared illegal by the Spanish courts. We continue to want to see the rule of law upheld, the Spanish constitution respected, and Spanish unity preserved.”

People wave Spanish flags during a protest in Madrid on October 28, 2017 against Catalonia's declaration of independence a day earlier. Paul White / AP Photo

Thousands of people took to the streets of Madrid in support of national unity. Many chanted “Prison for Puigdemont” and enormous Spanish flags were carried, but the sentiment in the Spanish capital was not so much pro-Rajoy as it was anti-Catalan.

“It is a disgrace what happened in Catalonia, and it’s a disgrace what happened after,” Carlos Fernandez, a 41-year-old mining engineer, told Agence France Press. “Nothing is going to change in two months,” he said, referring to Mr Rajoy’s call for elections, “it’s just prolonging the problem.”

There were elements among the crowds from the far-right of Spanish politics, with a banner saying "Spain doesn’t surrender" displayed by a xenophobic group called Hogar Social. Other protesters held flags of the Spanish Legion, an army unit, and members of the far-right National Democracy party joined the march.

“Today, we have all come to demonstrate our unity, to proclaim that we will get Catalonia back,” a woman told the crowd from a stage in the square where protesters gathered. There were cheers as she added: “We won’t stop until we see them in jail.”

There is a very real chance that Mr Puigdemont could face arrest over the next few weeks. Spanish prosecutors have said the Catalan leader and members of his dissolved government could face charges of sedition, rebellion and the misuse of public funds, which carry jail terms of up to 30 years.

Attempts by the Spanish government to jail any of the leading lights of Catalan independence would escalate the current crisis. Thousands of Catalonians have vowed to protect their leaders, saying they would form human chains around government buildings to stop the national police getting in to arrest them.

Another flashpoint could occur on Sunday, when Real Madrid, who have historically been associated with the political regime in Spain’s capital, visit Girona, a Catalan town 100 kilometres north-east of the regional capital Barcelona. A local radio station, Onda Cero, has reported that security concerns had put the status of the match in jeopardy.

There is also concern that the first El Clasico league clash between Real and Barcelona, scheduled for December 23, just two days after the regional elections, could be cancelled due to security concerns.