A Spanish judge barred Catalan authorities from confining about 160,000 people to their homes but the region's leader urged people to stay home anyway to stem a surge in coronavirus cases.
Catalan leader Quim Torra said he would approve a new decree to make it compulsory.
Spain, which has been one of the European countries worst affected by the coronavirus, lifted a nationwide confinement last month, when the pandemic seemed to have come under control.
But with dozens of new clusters seen around the country, and in particular in the northeastern Catalan region, local authorities are taking new measures either to lock down small areas or make it mandatory to wear a mask everywhere in public.
People in the Lleida area have been banned from leaving it since July 4, except for specific reasons such as going to or from work.
But the judge ruled that the move by the regional authorities - who have mounted a sustained campaign for independence from Spain - to impose home confinement went too far and did not go through the right channels.
"What is proposed today goes far beyond a simple limitation of movement and seriously affects constitutionally recognized rights," Judge Elena Garcia-Munoz Alarcos said in the ruling.
Torra, who is president of the Catalan regional government, said he could simply not accept such a ruling.
"We cannot understand that there is bureaucratic obstacles in decisions that are taken for the health and life of citizens," Torra told a news conference. "It's a luxury to lose time with legal resolutions. We cannot allow this."
Asking people to stay home, he said his government would adopt a new decree on Monday to try and solve any legal issues regarding the confinement order.
According to decree whch the judge struck down, people would only have been able to leave their home for work, to see a doctor, buy groceries or do sports. Gatherings of over 10 people would have been banned.
People will still not be able to leave the Lleida area under the lockdown decided earlier this month, but they can move freely within the area, the judge said.
La Rioja, Navarra, Aragon and Andalusia regions are set to make it compulsory from Monday to wear a face mask indoors and outdoors, authorities said, following a similar move in Catalonia, the Balearic Islands and Extremadura.
In the rest of the country, masks are compulsory only if you cannot be at least 1.5 meter away from people