"There are indications that Al-Qaeda is planning to carry out an attack against (a) target inside of Sanaa, possibly our embassy," Obama's counter-terrorism adviser John Brennan said on Sunday.
"So the decision was made to close the embassy. We're working very closely with the Yemeni government on taking the proper security precautions," Brennan said on CNN.
The US embassy posted a statement on its website saying the closure was "in response to ongoing threats by Al-Qaeda in the Arabian Peninsula... to attack American interests in Yemen."
Britain followed suit, with a spokeswoman for the Foreign Office in London confirming its Sanaa embassy had been closed "for security reasons."
A Yemeni government official told AFP the British mission was closed "out of fear of possible Al-Qaeda reactions," but stressed there were "no direct Al-Qaeda threats."
Spain meanwhile decided to restrict public access to its Sanaa embassy for the same reasons, a diplomatic source said after the online edition of El Mundo newspaper reported the mission would close on Monday and Tuesday.
Fears grew after AQAP urged Muslims on Monday to attack Western targets in the impoverished Arabian Peninsula country.
"We call upon every Muslim who cares about his religion and doctrine to assist in expelling the apostasies from the Arabian Peninsula, by killing every crusader who works at their embassies or other places, declare it an all-out war against every crusader on Mohammad's peninsula on land, air and sea," it said in a statement.
London and Washington meanwhile agreed to fund Yemen's special Counter-Terrorism Unit -- a special force which has received US training and assistance.
Brennan described the move as a "determined and concerted effort" but stressed Washington would not open up a new front in Yemen by sending in troops to help the authorities battle Islamist militants.
"We're not going to let Al-Qaeda continue to make gains in Yemen because we need to take whatever steps necessary to protect our citizens there as well as abroad," the US homeland security and counterterrorism adviser told Fox News.
He also hailed the Yemeni government for making "real progress" against Al-Qaeda and said Washington was "providing everything they've asked for."
"In the past month, Al-Qaeda has taken a number of hits. A number of Al-Qaeda leaders in Yemen are no longer with us," Brennan said.
Yemeni forces launched raids on suspected Al-Qaeda targets on December 17 and 24, killing more than 60 Islamist militants. A defence ministry newspaper said a plot to bomb the British embassy was also foiled.
Britain is due to host an international meeting on combating extremism in Yemen on January 28.
"Yemen has been recognised, like Somalia, to be one of the areas where we've got to not only keep an eye on but we've got to do more," British Prime Minister Gordon Brown said.
Brennan said that despite instability in Yemen, the United States would continue to repatriate about 90 Yemeni detainees to their homeland from the US naval base in Guantanamo Bay, Cuba ahead of its closure.
"Some of these individuals are going to be transferred back to Yemen at the right time and the right pace and in the right way," the White House adviser told CNN.
Close to half of Guantanamo's 198 remaining detainees are from Yemen -- the ancestral homeland of Al-Qaeda chief Osama bin Laden.
Yemen is also grappling with insurgents in the north and the south and has been rocked by several deadly anti-Western attacks.
Nineteen people were killed in a car bomb attack outside the US embassy in September 2008. In October 2000, 17 US military personnel were killed in a Al-Qaeda suicide attack on the USS Cole destroyer in southern Yemen.
The government has welcomed US and British help to fight extremism.
"Any assistance provided to Yemen's counter-terrorism force will be most welcome," a government official told AFP.