The Spanish parliament on Thursday approved the extension for six months of a state of emergency declared to fight a surge in coronavirus infections.
Prime Minister Pedro Sanchez's minority leftist government on Sunday declared an initial 15-day state of emergency and the extension approved by lawmakers means it will now run until May 9.
Under the state of emergency, Spain's 17 regional governments, which are in charge of health, can impose measures to restrict people's mobility, such as nighttime curfews and closing their borders.
The extension was approved with 194 votes in favour, 53 against and 99 abstentions, including by lawmakers from the main opposition conservative Popular Party (PP) which had called for the measured to be extended only until December.
"A broad horizon of security and stability has been granted to regional governments, who can adopt in coordination with the health ministry, the necessary measures to fight Covid-19," the prime minister's office tweeted after the vote.
This is the second time that Spain has declared a national state of emergency since the start of the pandemic.
The first was put in place in mid-March and it lasted until the end of June. It was used to enforce a strict lockdown, with people allowed outside only to go to work, seek medical care or buy food.
The government has said it wants to avoid another lockdown.
Since exiting the first lockdown in June, coronavirus cases in Spain have soared, with thousands of infections diagnosed every day. Hospitalisations, though lower than their March-April peak, are also on the rise.
Spain last week became the first European Union nation to surpass one million confirmed Covid-19 infections, with the virus claiming more than 35,000 lives.