Britain has closed its embassy in Iran and all UK staff have left the country after the compound was stormed by protesters.
Foreign Secretary William Hague announced that the Government was also requiring the closure of the Iranian embassy in London and the departure from Britain of all of its staff within the next 48 hours.
Addressing the Commons, Mr Hague said Tehran should be "ashamed" of the events that took place on Tuesday. About 24 embassy staff and their dependants were based at the embassy's office and residential compounds in Tehran.
Relations between Britain and Iran, already difficult, have worsened in recent weeks amid renewed concerns about President Mahmoud Ahmadinejad's nuclear ambitions. But Mr Hague insisted: "No difficulty in relations can ever excuse in any way or under any circumstances the failure to protect diplomatic staff and diplomatic premises."
He said he had last night called the Iranian Foreign Minister, who had said he was "sorry for what had happened".
"We have now closed the British Embassy in Tehran. We have decided to evacuate all our staff and as of the last few minutes all our UK-based staff have now left Iran," Mr Hague said.
He urged against all but essential travel to Iran and said British citizens in need of help would be able to get consular assistance from other EU missions in Tehran.
The attacks come two days after the Iranian parliament approved a Bill reducing diplomatic relations with Britain following London's support of recently-upgraded US sanctions on Tehran.
The Bill - which marks a new low point in diplomatic tensions between London and Tehran - requires Iran and Britain to withdraw their ambassadors from each other's country and reduce representation to the level of charge d'affaires.
It also calls for trade between the two countries to be reduced to "minimum levels". Last week, the UK announced that it had severed all financial ties with Iranian banks in response to mounting fears over the country's nuclear ambitions.