The Spanish government has ordered a 15-day state of emergency to bring down Covid-19 infection rates in the capital, after a court overturned a partial lockdown imposed a week ago.
Madrid and nearby cities will see restrictions enforced by 7,000 police.
The capital has been at the centre of a political row, with the centre-right city authorities challenging the Socialist-led government's demands.
Cases are down and a state of emergency is unjustified, say city officials.
Madrid health minister Enrique Ruiz Escudero insisted that measures already in place were working and that the national government order was "a measure no Madrileño will understand".
Late last Friday, all non-essential movement in and out of Madrid and the other nine cities was banned, despite the opposition of local authorities, led by regional president Isabel Díaz Ayuso.
When the Madrid authorities' court challenge was successful on Thursday night, Prime Minister Pedro Sánchez invoked constitutional powers he used to impose the original lockdown in March.
He moved quickly ahead of a holiday weekend, with Spaniards celebrating their national day on Monday.
Ms Ayuso appealed for a delay, but the prime minister was adamant "public health must be protected now".
Spain's health minister Salvador Illa bitterly criticised Ms Ayuso's approach. "The president of the Community of Madrid has decided to do nothing. Patience has its limits," he told reporters.
What state of emergency means
The order, in Spanish a "state of alarm", is not remotely as severe as the lockdown imposed in March. It brings back into force the measures brought in a week ago that were lifted by the court late on Thursday:
- Leaving and entering Madrid and nine other cities is banned for non-essential trips, although work, commercial activity and trips to schools are exempt
- Avoiding social contact between different local areas
- Hotels and restaurants will be limited to 50% capacity and doors must shut at 23:00
- Businesses are limited to 50% capacity and should shut by 22:00
- Family and social gatherings are limited to six people
- Places of worship are restricted to a third of normal attendance
The measures, set to come into force at around 16:00 (14:00 GMT), affect 4.78 million people in Madrid and cities such as Fuenlabrada, Getafe and Leganés.
Ahead of a long holiday weekend, with many people planning to leave the capital, it was unclear how that might be reinforced. However, the interior minister said some 7,000 security forces would be deployed around the city to ensure measures were respected.
How bad is Madrid's outbreak?
When the partial lockdown was imposed, Spain's government singled out areas with an infection rate higher than 500 cases for every 100,000 residents.
Last week it was far higher than that in Madrid, with at least 723 infections, but that has since fallen to closer to 500.
Madrid's health minister argued that restrictions on movement should only be in place in 51 of the region's 286 basic health areas where infection rates were higher than 750 cases per 100,000.
Centre-right Mayor José Luis Martínez-Almeida said the new measures were not "what the healthcare situation in Madrid requires".
What's happening in the rest of Europe?
Europe has reported an official daily count of 100,000 cases for the first time, as the continent grapples with a second wave.
France recorded its worst figure to date - more than 20,000 in 24 hours. Restriction have been tightened on four more cities - Lyon, Lille, Grenoble and Saint-Etienne will be classified alongside Paris and Marseille as zones of maximum alert.
UK Prime Minister Boris Johnson is to make a statement on Monday giving details of new restrictions to slow the spread of the virus in England.
German Chancellor Angela Merkel has warned the public they will face tighter restrictions in 10 days if a rise in infections is not stopped. There is growing alarm in Germany where new cases have exceeded 4,000 for the second day in a row.
The Netherlands, the Czech Republic, Ukraine and Poland have also reported record highs.