MADRID — Spain's government declared a state of emergency in Madrid on Friday, wresting control of efforts to fight the spread of COVID-19 from local authorities in a region that is experiencing one of Europe's most significant coronavirus outbreaks.

The step, which took immediate effect and lasts for two weeks, forced Madrid authorities to restore restrictions on travel that had been introduced by the national government but were struck down the previous day by a Madrid court ruling.

That successful legal challenge by Madrid officials was part of a long quarrel between the country's main political parties over their coronavirus response. Those differences, and the changing rules, have often dismayed and confused local residents.

"Well, it is all very nauseating," Vicente de la Torre, a 22-year-old Madrid mechanic, told The Associated Press. "We have no idea what we should do or what we shouldn't do."

The government announced the state of emergency after a hastily arranged Cabinet meeting in the wake of the court ruling. Health Minister Salvador Illa said the previous measures would come back into force and that only the legal framework for them was changing.

He told a press conference it was "undeniable" that there is community transmission in the Madrid region, not just isolated outbreaks, at a crucial juncture as winter approaches and respiratory problems increase.

"Action is needed, and today we couldn't just stand by and do nothing," Illa said. "It's very important that this doesn't spread to the rest of the country."

The Madrid region's 14-day infection rate of 563 coronavirus cases per 100,000 residents is more than twice Spain's national average of 256 and five times the European average rate of 113 for the week ending Sept. 27.

The central government's measures prohibit all nonessential trips in and out of the capital and nine of its suburbs, affecting some 4.8 million people. Restaurants must close at 11 p.m. and stores at 10 p.m.. Both must limit occupancy to 50% of their capacity.

The national government had ordered police in Madrid to fine people if they left their municipalities without justification. More than 7,000 police officers will now be deployed to ensure the restrictions are observed, Interior Minister Fernando Grande-Marlaska said.

But Madrid's conservative regional government opposed those restrictions, saying they were draconian and hurt the economy. Madrid's regional president, Isabel Díaz Ayuso, said her own, more moderate measures were enough to fight COVID-19.

A Madrid court on Thursday upheld the regional government's appeal, saying the national government's imposition of restrictions violated people's fundamental liberties.

The spat has taken place against a backdrop of political differences: Spain's national government is led by the center-left Socialist party, while the Madrid region is run by the country's main opposition party, the conservative Popular Party.

"It seems to me like an ideological war that is trying to show who has more power," said 18-year-old student Marta Illo. "They (the Spanish government) don't really like the regional government of Madrid. And we the people of Madrid are paying the price for a fight that is really political and has nothing to do with us."

——

Hatton reported from Lisbon, Portugal. Joe Wilson in Barcelona contributed to this report.