Spain has declared a national state of emergency and imposed a nighttime curfew in an effort to help control a new spike in Covid-19 infections.
Prime Minister Pedro Sánchez said the curfew from 11pm to 6am would come into force on Sunday.
Under the emergency measures, local authorities can also ban travel between regions, Sánchez said.
He said he would ask parliament to extend the new rules, initially in force for 15 days, to six months.
Spain was hit hard during the first wave of the pandemic earlier this year and imposed a much more restrictive lockdown - one of the toughest in the world.
Like many other European regions, however, it has been hit by a second wave of infections.
What are Spain's emergency measures?
Sánchez said different regions would have up to an hour of flexibility if they wanted to modify the duration of the overnight curfew.
Restrictions on movement between districts would be determined by regional leaders and was likely to be dependent on work and medical needs, he added.
The new measures announced include a limit on public and private gatherings of different households to a maximum of six people.
"The situation we are going through is extreme," Mr Sánchez said in a televised address on Sunday, adding: "It is the most serious in the past half century."
More than half of Spain's 17 regions had been calling for tighter restrictions, and the latest measures will apply to all regions except the Canary Islands.
The same level of emergency was introduced during the first wave of the pandemic in April.
Spain has passed one million cases since it began and nearly 35,000 people have died.