Several dozen protestors broke away from a crowd of a few hundred outside the main British Embassy compound in downtown Tehran, scaled the gates, broke the locks and went inside.
Protestors pulled down the British flag, burned it, and put up the Iranian flag, Iranian news agencies and news pictures showed. Inside, the demonstrators smashed windows of office and residential quarters and set a car ablaze, news pictures showed.
British Prime Minister David Cameron chaired a meeting of the government crisis committee to discuss the attacks which he said were "outrageous and indefensible."
"The failure of the Iranian government to defend British staff and property was a disgrace," he said in a statement.
The UN Security Council condemned the attacks "in the strongest terms. Catherine Ashton, the EU High Representative for Foreign Affairs, called on Iran Tuesday to fulfil international obligations to protect embassies after the "unacceptable" storming of the British mission in Tehran.
"It is with extreme concern that I have learnt that the premises of the embassy of the United Kingdom in Tehran have been overrun by demonstrators. I strongly condemn this totally unacceptable incursion," Ashton said.
US President Barack Obama said he was disturbed by the incident and called on Iran to hold those responsible to account.
The attacks come at a time of rising diplomatic tension between Iran and Western nations who last week imposed fresh sanctions over Tehran's nuclear programme, which they believe is aimed at achieving the capability of making an atomic bomb.
Iran, the world's fifth biggest oil exporter, says it only wants nuclear plants to generate electricity.
The embassy storming is also a sign of deepening political infighting within Iran's ruling hardline elites, with the conservative-led parliament attempting to force the hand of President Mahmoud Ahmadinejad and expel the British ambassador.
"Radicals in Iran and in the West are always in favour of crisis ... Such radical hardliners in Iran will use the crisis to unite people and also to blame the crisis for the fading economy," said political analyst Hasan Sedghi.
An Iranian official told Reuters the storming of the British compounds was not planned by the government.
"It was not an organised measure. The establishment had no role in it. It was not planned," said the official, who declined to be identified. Iran's Foreign Ministry said it regretted the attacks and was committed to ensuring the safety of diplomats.
Police arrested 12 people who had entered the north Tehran compound, Fars said, quoting a police chief as saying they would be handed over to the judiciary.
Protestors said they planned to stage a sit-in at the gates of the north Tehran compound and would not move until they were told to do so by Iran's religious leaders.