Madrid's regional government has appealed against a national order that requires a partial lockdown of the Spanish capital just hours before a Friday night deadline for enacting the restrictions in the European coronavirus hot spot.

The appeal asks National Court judges to outlaw restrictions on movement, social gatherings and commerce by arguing that the order by central authorities violates regional self-rule laws and that it provokes “totally unjustified” economic damage.

Madrid is leading the resurgence of the virus in Spain, which has Europe’s highest cumulative caseload — 770,000 since the onset of the pandemic.

People take part in a protest to demand more resources for public health system and against social inequality in the southern neighbourhood of Vallecas in Madrid, Spain, Thursday, Oct. 1, 2020. Residents in a lockdown district of Madrid protested outside the Madrid Regional Government that local health services needed to be reinforced during the ongoing COVID-19 outbreak. (AP PhotoManu Fernandez)

People take part in a protest to demand more resources for public health system and against social inequality in the southern neighbourhood of Vallecas in Madrid, Spain, Thursday, Oct. 1, 2020. Residents in a lockdown district of Madrid protested outside the Madrid Regional Government that local health services needed to be reinforced during the ongoing COVID-19 outbreak. (AP PhotoManu Fernandez)

The capital had a two-week infection rate of 695 cases per 100,000 residents Thursday, more than twice the national average of 274 cases and seven times the European average, which stood at 94 per 100,000 residents last week, according to the European Center for Disease Control and Prevention.

Under the new national order, Madrid's regional authorities must announce before the end of Friday a set of new measures that will ban all non-essential trips in and out of the capital and nine of its suburbs, which have a population of around 4.8 million.

The national order sets a minimum of restrictions, including the need for commuters to justify that they are going or returning to work, see a doctor or conduct essential administrative or legal errands in order to leave Madrid or the town where they live.

Restaurants will need to close at 11 p.m. and shops at 10 p.m., with a restriction of 50% capacity.

Similar measures already apply to more than 1 million residents, and the region has limited social gatherings to a maximum of six people.

It wasn't immediately clear how the new measures could affect the few incoming tourists arriving in Madrid, but regional authorities can't ban foreign visitors unless Spain closes down its borders.

The soft lockdown order comes after weeks of political bickering, with the center-right regional government resisting a full Madrid lockdown and accusing Prime Minister Pedro Sánchez's left-wing coalition of going after the region for political reasons.