All British nationals are being urged to leave Tunisia because "a further terrorist attack is highly likely", Foreign Secretary Philip Hammond says.
The Foreign Office estimates 2,500 to 3,000 UK tourists are in Tunisia and a few hundred British residents.
There is no specific threat, but travel firms are seeking to fly Britons out over the next few days and some are repatriating their British staff.
Thirty Britons were among 38 tourists killed in a gunman's attack on 26 June.
The Foreign Office has also advised against all non-essential travel to Tunisia.
It said although Tunisian authorities had put in place more security measures since the June attack, these did not provide "adequate protection for British tourists".
But Nabil Ammar, the Tunisian ambassador to the UK, told BBC's Newsnight the decision was "what the terrorists want", saying it would also damage the country's tourist industry.
Naveena Kotoor, a freelance journalist in Tunis, the capital of Tunisia, said people in the country were "devastated" by the advice to tourists.
In its updated advice the FCO said tour operators were arranging additional flights back to the UK.
Britons are urged to get in touch with their tour operators, with those travelling independently advised to return on commercial flights.
Tunisia declared a state of emergency after the 26 June attack, which happened in the popular resort of Port El Kantaoui, just north of Sousse.
Witnesses described how a gunman, identified as Tunisian student Seifeddine Rezgui, opened fire at tourists on sunloungers outside the five-star Hotel Rui Imperial Marhaba.
Mr Hammond said: "While we do not have any information suggesting a specific or imminent threat, since the attack in Sousse the intelligence and threat picture has developed considerably, leading us to the view that a further terrorist attack is highly likely."
He said the Tunisian investigation into the Sousse attack and the attack on the Bardo Museum in Tunis in March was ongoing.
Mr Hammond said an assessment of the security measures in tourist areas found that more work was needed "to effectively protect tourists from the terrorist threat".
The Association of British Travel Agents (Abta) said those due to travel to Tunisia should contact the company they had booked through.
Travelling to Tunisia now would be likely to invalidate travel insurance policies, but most policies would provide cover for those currently in the country, it added.
Victoria Bacon, from the association, said: "All Abta members... who have customers in the region have now come forward and made a commitment to get their customers out within the next 24-48 hour period."
'I don't want to leave'
One British tourist who arrived in Tunisia the day before the Foreign Office changed its advice said she was "shocked and disappointed" that she had to leave.
Heidi Barlow, from Derbyshire, is on holiday in Hammamet with her mother. They were due to stay until 19 July but were told about the warning to leave from friends and family in the UK.
The 34-year-old said: "I don't want to leave. I appreciate that if we have to go, we have to go, but I am not worried by the advice.
"We have these threats in Britain anyway. People have saved up their money and want to get on with their holiday."
She added: "We have seen all the extra security here and we feel very secure."
Michelle Ayres, from Newmarket, Suffolk, is staying in Sousse having arrived there last Saturday for a week-long holiday.
She said there were "about 50 British people together all packed waiting to go", adding: "Someone said that there were 10 extra flights and buses being laid on, but we haven't heard anything more on that.
"We feel we are a lot safer in the hotel, as if we leave on these buses, you may as well put up a Union Jack on them.
"They are amazing here at the hotel and with all the extra security, we feel completely safe."
Abta said people who had booked a package holiday to Tunisia would be entitled to a refund or alternative holiday.
It said low numbers of British tourists were currently in Tunisia - 25,000 are usually expected at this time of year.
Simon Calder, travel editor at the Independent, told the BBC that it would have been a "very tough decision" for the Foreign Office to change its travel advice, because "it... says to the people behind the attack at Sousse, here you are, you've got a victory.
"You've effectively wiped out Tunisia's tourist industry - or at least a large part of it - for the rest of the summer. That is going to cause economic mayhem."
Background and analysis
Thomas Cook has cancelled all its bookings to Tunisia up until the end of October, saying the "safety and well-being" of its customers were its key concerns.
It would be bringing back its customers using third party carriers and using 10 scheduled flights over the weekend, a spokesman said.
"Thomas Cook is strongly advising its guests in the country to return on these flights."
Thomson and First Choice staff working in Tunisia are being returned home within the next 24 hours "as a precautionary measure", the companies said.
Monarch Airlines said it would repatriate all customers in resorts "back to the UK as soon as possible" and flights had been organised to take them out of Tunisia by this weekend.
A spokesman said the airline was cancelling all flights to Enfidha [an airport near Sousse] for the rest of the summer season with "immediate effect".
All customers who have already booked to travel there will get a full refund or credit or they may be able to change their destination.
Jet2.com and Jet2holidays said all of its travellers were out of Tunisia and it had no plans to return there this season.