Madrid is set to impose new coronavirus restrictions on people entering and leaving the city despite the opposition of the regional government, which pledged to fight the measures in court.

The region is the worst-hit by covid-19 in europe, reporting 49,000 cases in the past fortnight and an infection rate of 735 per 100,000 people over the period.

After days of confrontation with central government, isabel daz ayuso, head of the regional administration, said on thursday that madrid would implement a ministry of health order that restricts access to spains capital and nine outlying municipalities.

This region is not in rebellion, ms daz ayuso said. we will comply strictly with all the orders...but we will go to the courts to defend the legitimate interests of madrileos.

The conflict over the measures reflects the failure of spains often bitterly polarised national and regional governments to keep the pandemic under control since the formal end of the countrys lockdown in june.

Madrids centre-right regional administration, a political foe of prime minister pedro snchezs leftwing national coalition, is keen to avoid new curbs that apply to the whole of the capital and to protect the regions economy, the biggest in spain.

But critics say madrid has responded too slowly and halfheartedly to the crisis.

Under the rules, people will not be able to enter or leave the city of madrid except for work, education or other permitted reasons. bar service will be banned, restaurants forbidden to accept new customers after 10pm and residents asked to avoid unnecessary journeys.

The central government had given the region 48 hours to comply with the curbs.

But when asked on wednesday night whether madrid would fall into line, enrique ruiz escudero, the regions top health official, had indicated it would not. he argued that the ministrys order which in theory applies to hard-hit municipalities anywhere in spain was generic, arbitrary and lacked legal validity because it was not unanimously backed by spains regions.

The order, which has been endorsed by most regions, imposes the new curbs in cities with a level of more than 500 coronavirus cases per 100,000 people over two weeks, where more than 10 per cent coronavirus tests are positive and where more than 35 per cent of intensive care beds are occupied by covid-19 patients.

At present, the only part of spain where the criteria would apply is greater madrid in part because of the acute pressure the second coronavirus wave is putting on the regions hospitals.

Ms daz ayusos administration said the situation was stabilising, but the region has reported more than 150 covid-19 deaths in the past two days.

Until now, madrids response has focused on limiting movement in 45 largely working-class neighbourhoods that account for about 15 per cent of the regions population and some 27 per cent of its coronavirus cases.