The US also urged its citizens living in Yemen to depart immediately. Neither the American nor British authorities said how many employees were affected by the decision to withdraw personnel.
The measures came a day after officials in Washington said the United States had intercepted electronic communications in which the head of al-Qaeda ordered the leader of the group's affiliate in Yemen to carry out an attack as early as this past Sunday.
The British and American warnings came hours after news reports that at least four men, suspected of being al-Qaeda members, were killed in what local tribal leaders and Yemeni officials said was an American drone strike in central Yemen early Tuesday.
The State Department warned US citizens of "the high security threat level in Yemen due to terrorist activities and civil unrest". It urged Americans "to defer travel to Yemen and those US citizens currently living in Yemen to depart immediately."
In London, a spokesman for the Foreign Office, who sought anonymity under departmental rules, said: "Due to increased security concerns, we have withdrawn all staff today in the British Embassy in Sana, and the embassy will remain closed until staff are able to return. We have closed the embassy because we assess there is an increased threat."
The spokesman declined to discuss the specific nature of the threat.
Alan Cowell