British tourists have been told to leave Spain within days after the Spanish government announced that all hotels would close from next Tuesday.

The Foreign Office today warned British travellers to 'make travel plans to return as soon as possible' after Madrid announced the shutdown.

Holidaymakers are urged to 'contact their tour operator or airline as soon as possible' to make arrangements to fly home.

Spain has imposed a near-total lockdown and banned people from leaving their homes except to go to work, buy food or receive medical care.

Spanish soldiers stand guard in Puerta del Sol in the capital Madrid, where the Spanish government has ordered a shutdown of all hotels

'The Spanish government have confirmed that all hotels will close in Spain from Tuesday 24 March,' the FCO said in a statement.

'We therefore advise British travellers in Spain to contact their tour operator or airline as soon as possible, to arrange their return journey home before this date.'

The outbreak in Spain has become the worst in Europe outside Italy, with more than 13,700 people infected and 598 dead.

Britons made nearly 19million visits to Spain last year, and many British expats live in the country, meaning many holiday plans are likely to be ruined by the outbreak.

Other British tourists are facing a similar struggle to get home from countries including Morocco and Cyprus.

Holidaymakers struggling to return home have accused airlines of leaving them stranded and demanding extortionate fees.

Tom Widdall, who is in Morocco with his heavily pregnant girlfriend, was due to fly home from Agadir to Manchester on Saturday, but his easyJet flight was cancelled.

He said he has been unable to get on to an earlier flight and claimed he has been 'abandoned by easyJet and abandoned by the embassy'.

EasyJet told passengers it is 'doing all we can to assist'.

Spain has declared a state of alert, shutting all but essential services and ordering its population of 46 million people to stay at home.

People are only allowed to go out to buy food or medicine, to go to work or to get medical treatment.

Fines for breaching the rules can be up to 30,000 euros (£27,200) and a public address system is reinforcing the message in Spanish, Catalan, English and German.

Madrid remains the worst-hit area, accounting for 5,637 cases, or 41 percent of the infections in Spain, while the death toll there rose to 390 - around two-thirds of the national total.

The number of infections could well be higher, because Spain - like many other countries - has been struggling with a shortage of testing kits.

Military personnel disinfect streets in Santiago de Compostela today during the lockdown in Spain

In Madrid alone, the health authorities said they were in touch with more than 20,000 patients by phone.

Health minister Fernando Simon said on Tuesday that the patients interviewed were a mixture of 'confirmed and suspected' cases.

Spain is now set to receive a new batch of testing kits, meaning medics will 'run tests on anyone showing symptoms,' the health minister said today.

The minister warned it could 'substantially increase' the number of positive cases.

Earlier, prime minister Pedro Sanchez warned that the virus had not yet peaked in Spain in an address to a nearly-empty parliament.

'The worst is yet to come, as our health system feels the impact of caring for such a huge number of infected people, as the days of isolation drag on, when we feel the economic impact' of the pandemic, he said.

'I am asking you to make sacrifices but I'm also calling for unity... it is what we have to do to save many lives,' he said.

Sanchez's government officially declared the 15-day state of emergency on Saturday.

It is only the second such declaration since the country returned to democracy following the death of dictator Francisco Franco in 1975.

The other time was during a 2010 air traffic controllers' strike.

The Foreign Office is now advising against all but essential international travel, including to Spain, because of the coronavirus outbreak.