While hotels were getting ready to follow orders and shut down by Thursday this week, the government also announced by decree that a handful across the country will be staying open.
The main purpose of the 371 hotel-openings on the government's list is for key workers, such as from health and emergency services, who cannot get home. However tourists stranded, waiting for a flight or having to cross Spain by road before heading to France, are also able to use them.
This policy was also echoed by the British Embassy and a list of the hotels was published on its BritsinSpain Facebook page.
British Ambassador, Hugh Elliott, said, "This is a very difficult time for British nationals who find themselves currently unable to get back to the UK and we welcome this announcement by the Spanish authorities that some hotels and short-stay accommodation will remain open during the state of emergency."
The list is subject to update, and at the time of press there were ten in Malaga province, including the Costa del Sol.
However hoteliers' representatives were unhappy that the government announced the list without full consultation. They say some of the hotels are already closed with the staff laid off and will have to be reopened again.
Also this week, the British Embassy, through its Facebook page and other social media, started to keep those wanting to return to the UK informed of the few flights available, while also urging people to keep checking with airlines. It also provided a template of an official letter to show if stopped by police on a road or ferry journey back to Britain.