Britain's foreign office has confirmed some of its staff are leaving the Iranian capital, Tehran, after hundreds of protesters stormed its embassy.
Protesters stormed the embassy and another diplomatic compound in Tehran, trashing offices and stealing documents. One small building is reported to have been set on fire during the incident.
Earlier, Reuters news agency, quoting Western diplomatic sources, reported Britain was withdrawing all its diplomatic staff from Tehran.
The British Prime Minister David Cameron has branded the Iranian government a "disgrace" for failing to protect embassy staff from the demonstrators and warned of "serious consequences" over the attack, in which windows were smashed, cars torched and Union Jack flags burnt.
US President Barack Obama called on the Iranian government to honour international agreements and protect diplomatic facilities in Tehran.
He says, for the rioters to essentially be able to overrun the embassy and set it on fire, is an indication that the Iranian government is not taking its international obligation to protect diplomatic outposts seriously.
"I strongly urge the Iranian government to hold those who are responsible to task," the US President says.
Meanwhile, the speaker of Iran's parliament has criticised the United Nations Security Council over its unaminous condemnation of the storming of the British embassy.
Ali Larijani says the resolution, which he describes as devious, puts global security at risk.
He says the Iranian police did all they could to keep the peace.
Iranian TV links attack to sanctions
Iranian state television says the attack happened during a rally against new sanctions Britain has imposed on Iran over its nuclear programme.
On 21 November, Britain the United States and Canada announced new measures targeting Iran over its nuclear plans. The British Treasury imposed sanctions on Iranian banks.
Iran insists its nuclear programme is for peaceful purposes only.
On Sunday, Iran's parliament voted by a large majority to downgrade diplomatic relations with the UK in response to the British action.
Iranian radio reported that some MPs chanted ''Death to Britain'' during the vote, which was approved by 87% of MPs.