Madrid’s top regional court on Thursday rejected a partial lockdown imposed at the weekend on the capital and nine nearby towns to slow down the rapid spread of coronavirus infections.

As per the court statement, it “had denied the ratification (of the measures) on grounds they impacted on the rights and fundamental freedoms” of the 4.5 million residents affected by the closure, which went into force late Friday night.

Under the restrictions, residents are not allowed to leave the city limits except for work, school or medical reasons as the region battles a soaring infection rate of well over 700 cases per 100,000 people, compared with just 257 per 100,000 in the rest of Spain — in itself the highest rate in the European Union.

With the denial of the ratification of the measures by the court, police have no legal grounds for issuing fines for non-compliance — which they have not yet done pending the court’s decision.

In their ruling, the regional judges said the responsibility for public health matters lies with Spain’s 17 autonomous regions and the health ministry, which imposed the restrictions, did not have the right to do so.

Accordingly, the measures, which were agreed last week at talks between the health ministry and its counterparts in most of the regions, “constitute an infringement by the public authorities on the citizens’ fundamental rights without legal authorisation,” the judges found.

Even though Madrid’s regional leaders agreed to implement the restrictions, they expressed strong opposition and filed their own challenge at Spain’s National Court, which remains pending.

When the pandemic erupted in March, the Spanish government declared a state of emergency that gave it the power to impose and enforce a lockdown across the entire country.

But since that ended on June 21, it is the regions that have had responsibility for public health and managing the pandemic.