Protesters first attacked the British Embassy in Tehran, smashing windows and burning the British flag.
An angry crowd numbering in the hundreds outside the embassy walls during the incursion shouted "Death to England! Death to three terrorist countries: America, Israel, and England!"
A second British diplomatic compound, located in the north of the capital, was stormed by at least 100 protesters. The semi-official Fars news agency reported that six British diplomats who had been holed up for more than two hours in a building inside the diplomatic compound had been able to get through protesters after intervention from diplomatic police.
Photo Gallery: The Storming Of The British Embassy
A statement from Britain's Foreign Office confirmed "an incursion by a significant number of demonstrators into our embassy premises, including vandalism to our property." It expressed "outrage" and condemned the assault as "utterly unacceptable" and said senior British officials had urged Iranian authorities to bring the situation under control and obey international obligations to protect foreign diplomatic missions.
The office also urged all British nationals in Iran "to stay indoors, keep a low profile, and await further advice."
British Prime Minister David Cameron, who chaired a meeting of his cabinet's crisis committee, said the attack was "outrageous and indefensible" and will prompt "serious consequences."
Iranian state television carried live broadcasts of the scene as protesters threw stones and broke embassy windows, and images showed at least one vehicle inside the compound on fire.
A journalist for the French news agency AFP outside the embassy compound reported seeing about 20 demonstrators break into the main embassy building in a first wave of the attack. Students later could be seen throwing documents from the windows of the embassy building and over the compound gates.
Some demonstrators threw Molotov cocktails, and smoke rose from parts of the embassy grounds as the British flag was replaced with a banner carrying the name of seventh-century Shi'ite saint Imam Hussein.
One young demonstrator could be seen climbing over the compound wall with a looted portrait of Britain's Queen Elizabeth II. As he held the portrait upside down, women in chadors struck the queen's portrait with the staffs of their Imam Hussein banners.
Correspondents say the initial intrusion occurred as ranks of Iranian police in riot gear stood by, doing nothing.
Summoning Memories Of 1979
Later, Iranian police with helmets and shields could be seen at the gates to the compound trying to hold back a larger crowd of demonstrators and clashing with young male demonstrators while others poured into the compound.
Fars news agency reported that police used tear gas to disperse protesters and that several officers and protesters were wounded. At least one protester was reported to be in critical condition. It also reported that 12 protesters have been arrested and that an investigation into the incident has begun.
In Washington, the White House issued a statement condemning the attack "in the strongest terms" and saying that the United States "stand(s) ready to support our allies at this difficult time."
In Brussels, European Union foreign policy chief Catherine Ashton also condemned the embassy storming and called on Iran to fulfill its international obligations to protect foreign missions and their staff.
In a statement, the Iranian Foreign Ministry said it "regrets the unacceptable acts of a few protesters" and respects the immunity of foreign diplomatic missions inside Iran. It also said officials would investigate the matter and take necessary steps.
A group called Muslim Student Followers of the Supreme Leader claimed responsibility for organizing the attack, issuing a statement that was reportedly written in blood.
Why Iran Distrusts Britain
It said Iranians "are not prepared to be humiliated anymore under any circumstances and prefer a red death to a condemned life of misery. We are ready to be killed for our aims."
They also called for the German and French embassies to be shut down, and referred to the British Embassy as "another nest of spies that must be shown our wrath and hatred toward it."
That remark is seen as a reference to events in Tehran 32 years ago, when hundreds of conservative Islamic students from the capital's main universities broke through the gates of the U.S. Embassy, taking 52 Americans hostage for 444 days.
Revolutionary leader Ayatollah Ruhollah Khomeini supported the seizure of the U.S. Embassy in November 1979, calling the embassy an "American spy den in Tehran" and calling the action by the students Iran's "second revolution."
The latest embassy incursion came just two days after Iran's parliament passed a law to downgrade diplomatic ties with Britain in response to new British sanctions that sever all U.K. ties with Iran's financial sector.
The legislation requires Britain's ambassador to leave the country within two weeks. On November 29, the Iranian parliament ordered President Mahmud Ahmadinejad to bring the new law into effect.
The U.K. move -- which occurred simultaneously with similar U.S. and Canadian action -- followed a recent report from the UN's nuclear watchdog that said Iran's nuclear program has included weapons development as recently as 2003.
Britain has threatened to act "robustly" if its ambassador, Dominick Chilcott, is expelled from the country.
with contributions from Ron Synovitz, Frud Bezhan, and Radio Farda's Hamid Fatemi in Prague and Golnaz Esfandiari and Heather Maher in Washington