Spain’s prime minister moved Saturday to invoke a never-used constitutional article that would strip Catalonia of its autonomous power, calling it a last resort to “restore order.”

Catalonia's president responded by making a veiled independence threat, telling lawmakers to come up with a plan to counter Spain's "attempt to wipe out self-government."

Prime Minister Mariano Rajoy said he wants the country’s senate to allow central ministers to take over functions from all members of the Catalan leadership, effectively dissolving the prosperous region of its government. It would also take control of the regional police, finances and the public media.

He blamed separatists for pushing the central government to take the unprecedented measures.

Rajoy is also seeking the Senate's approval to assume the power to call a regional election -- something that only Catalonia's top leader can do now.

"There is no country in the world ready to allow this kind of situation within its borders," Rajoy said Saturday. "It is my wish to call elections as soon as normality is restored."

Rajoy’s Cabinet met in a special meeting Saturday morning to approve measures to take direct control of the Catalan region under Article 155 of the Spanish Constitution. Under Article 155, central authorities are allowed to intervene when one of Spain’s 17 autonomous regions fails to comply with the law. It has never been used since the 1978 Constitution was adopted.

The meeting came almost three weeks after Catalan citizens voted for independence in a controversial referendum that was ruled illegal by the country’s Supreme Court.

In a televised address late Saturday, Catalan President Carles Puigdemont called Rajoy's plans to replace him and his cabinet an "attempt to humiliate" Catalonia and an "attack on democracy." He called on the regional parliament to "debate and decide on the attempt to wipe out our self-government and our democracy, and act accordingly."



Puigdemont called Rajoy's move the "the worst attack" on Catalan people and institutions since Gen. Francisco Franco's abolishment of Catalonia's regional government in 1939.



Barcelona mayor Ada Colau, who opposes independence without a valid referendum, called Rajoy's measures "a serious attack" on self-government in Catalonia. Others went further. Catalan parliament speaker Carme Forcadell accused Spain's central authorities of carrying out a coup.



"Mariano Rajoy has announced a de facto coup d'etat with the goal of ousting a democratically elected government," Forcadell said, calling it "an authoritarian blow within a member of the European Union."



CATALONIA'S PUSH FOR INDEPENDENCE FROM SPAIN: WHAT TO KNOW

The vice president of the Senate says a session next Friday will vote on the measures. Conservative senator Pedro Blanco told reporters a special commission of 27 senators will make a first assessment of the measures Tuesday. He said Puigdemont can appeal the moves by appearing before the commission before noon Thursday or by sending an envoy.

Rajoy's ruling Popular Party has an absolute majority in the chamber and is expected to receive wide support from opposition senators for measures to protect Spanish unity.



In response, protesters wrapped in red-and-yellow Catalan flags flooded the streets of central Barcelona on Saturday, holding up signs calling for freedom.



About 450,000 people joined the protest, according to police, although an anti-secession group put the number at 85,000. The demonstration had originally been called to protest the detention of two pro-independence activists who are awaiting possible sedition charges, but it turned into an outcry over Rajoy's takeover move.



"We are here because the Spanish government made a coup without weapons against the Catalan people and their government institutions," said Joan Portet, a 58-year-old protester.



The slow-burning constitutional crisis over secession escalated this month when regional government officials held a disputed independence referendum on Oct. 1. They then declared that the result -- strongly in favor of independence -- gave them a legal basis for separating from Spain even though the vote itself had numerous problems.

The country's Constitutional Court has so far ruled against all moves toward secession, including the Catalan referendum.



Albert Rivera, head of the pro-business Citizens party, said he backed Rajoy's measures because Catalonia needs to restore legal security so companies can remain in the region. Hundreds of companies have transferred their registered headquarters out of Catalonia to other areas in Spain, fearing the chaos that independence -- or the fight over it -- could bring.



Basque nationalists and the far-left Podemos party were among those in Madrid opposing the government's move.



"We are in shock about the suspension of democracy in Catalonia," said Podemo's Pablo Echenique, vowing to work to oust Rajoy and his conservative Popular Party.



Barcelona resident Rosa Isart said the Spanish government's determination to prevent Catalonia from leaving reminded her of Franco's dictatorship decades ago.



"It seems unbelievable that I have to see this again, because of the incompetence of these politicians who don't know how to speak to each other," Isart said.



Others were sympathetic to Rajoy's plan. Barcelona resident Carlos Assensio agreed with Madrid, given the separatists' refusal to abide by Spain's laws.



"If we don't respect the law, this could be a total anarchy," said the 65-year-old.



The Associated Press contributed to this report.