Protesters in the Iranian capital, Tehran, have broken into the UK embassy compound during a demonstration against sanctions imposed by Britain.
Militant students are said to have ransacked offices, burned the British flag and smashed embassy windows.
The move comes after Iran resolved to reduce ties following the UK's decision to impose further sanctions on it.
The UK's Foreign Office said it was "outraged" by the actions. Iranian officials have expressed "regret".
"It is utterly unacceptable," the Foreign Office said in a statement. "The Iranian government have a clear duty to protect diplomats and embassies."
It later updated its travel advice to Iran, urging Britons there to "stay indoors, keep a low profile and await further advice".
The Iranian Foreign Ministry expressed "regret for certain unacceptable behaviour by a small number of protesters in spite of efforts by the police".
"The relevant authorities have been asked to take the necessary measures and look into this issue immediately," it said.
The students clashed with riot police and chanted "the embassy of Britain should be taken over" and "death to England".
Students were said to have ransacked offices inside the building, and one protester was reported to be waving a framed picture of Queen Elizabeth II.
Iran's semi-official Mehr news agency said embassy documents had been set alight. Staff fled by the back door, the agency added.
Pictures showed a car inside the compound on fire while several hundred other demonstrators were gathered outside the embassy's walls.
After about two hours, police seemed to be back in control of the building. Live TV footage showed riot police removing protesters.
Security forces fired tear gas, the semi-official Fars news agency reported. It said some protesters and police had been injured in the clash.
However, later reports said some protesters were still in the embassy. The governor of Tehran and the city's head of security have entered the building to try to persuade them to leave, the BBC has learned.
An unconfirmed report from the official Irna news agency said a separate group of protesters had broken into another British embassy compound in the north of the city and seized "classified documents".
It was not clear how many embassy staff were in the building at the time. A Foreign Office source said it was checking on the well-being of workers and diplomats, AP reported.
There was strong international reaction to Tuesday's events.
The US condemned the attack "in the strongest terms".
"We stand ready to support our allies at this difficult time," White House spokesman Jay Carney said.
French Foreign Minister Alain Juppe also condemned the incident, adding: "France expresses its full solidarity with the UK."
Russia said the attack was "unacceptable and deserving condemnation".
A spokeswoman for EU foreign policy chief Catherine Ashton said it was a "totally unacceptable incursion".
Last week the US, UK and Canada announced new measures targeting Iran over its controversial nuclear plans.
For its part, the UK Treasury imposed sanctions on Iranian banks, accusing them of facilitating the country's nuclear programme
That decision followed a report from the International Atomic Energy Agency (IAEA) that suggested Iran was working towards acquiring a nuclear weapon.
It said Iran had carried out tests "relevant to the development of a nuclear device".
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 had chanted "Death to Britain" during the vote, which was approved by 87% of MPs.