"We have amended our travel advice for Somalia," the ministry said in a statement.
"Our advice makes clear that there continues to be a high threat from terrorism and that the FCO believes that terrorists are in the final stages of planning attacks in Mogadishu.
"We advise against all travel to all parts of Somalia."
There is no British representation in any part of Somalia, with any British nationals visiting urged to register with the embassies in Addis Ababa or Nairobi.
The ministry warns Britons of a "dangerous level of criminal activity by armed militia throughout Somalia".
Despite a string of losses in recent months, Somalia's Al-Qaeda linked Shebab extremists remain a potent threat, still controlling rural areas as well as carrying out guerrilla attacks in areas apparently under government control.
Somalia has been ravaged by conflict since 1991 but a new United Nations-backed government took power last year, ending eight years of transitional rule by a corruption-riddled administration.
"The safety of British nationals abroad is a major concern for the FCO," the ministry said.
"We therefore attach great importance to providing information about personal safety and security overseas, including an assessment of the level of threat from terrorism, to enable people to make informed decisions about travel."