Britain is withdrawing diplomats from Iran following the incursion into its embassy in Tehran on Tuesday, British Foreign Office said in a statement on Wednesday.

"The prime minister and foreign secretary have made clear that ensuring the safety of our staff and their families is our immediate priority. In light of yesterday's events, and to ensure their ongoing safety, some staff are leaving Tehran," the statement said.

A first group of embassy staff were reported to be flying out to Dubai. But the Foreign Office has not confirmed whether all its diplomats are being pulled out from Iran.

Meanwhile, Iran's state IRIB TV reported on its website on Wednesday that all the British embassy staff have left Iran.

But the Iranian Foreign Ministry did not confirm the reports that British embassy staff have left Iran. Calls to the British embassy in Tehran went unanswered.

On Tuesday, thousands of angry Iranian demonstrators broke into two British embassy compounds, burning British flags and a car, following Iran's decision on Sunday to downgrade its diplomatic ties with Britain in response to its newly imposed financial sanction against Tehran.

British Prime Minister David Cameron late Tuesday warned Iran of "serious consequences" for failing to protect Britain's embassy staff during the intrusion.

"The attack on the British Embassy in Tehran... was outrageous and indefensible. The failure of the Iranian government to defend British staff and property was a disgrace," said Cameron in a statement.

"Those responsible for this criminal attack must be prosecuted," Cameron said.

British Foreign Secretary William Hague later condemned the attack and blamed Iran for the "grave breach of the Vienna Convention which requires the protection of diplomats and diplomatic premises under all circumstances."

Meanwhile, the Iranian Foreign Ministry has expressed regret over the storming of the British embassy and the ensuing incidents.

A statement posted on the ministry's website said it felt regretted over what it called the "unacceptable" behavior of some protesters in front of the British embassy during the day.

The Foreign Ministry said it respects international regulations concerning the security of diplomatic centers and emphasizes its obligations to ensure the security of diplomats and diplomatic places in the Islamic Republic of Iran.

Iranian Foreign Minister Ali-Akbar Salehi said he was "sorry" for what had happened. Tehran Police Chief General Hossein Sajadinia said several protesters had been arrested and would face trial.

The attack against the British embassy in Tehran has drawn worldwide criticism.

The UN Security Council on Tuesday condemned "in the strongest terms" the attacks, calling on the Iranian authorities to protect diplomatic and consular property and personnel, and to respect fully their international obligations.

The White House has also condemned "in the strongest terms" the storming of the British embassy in Tehran.

"Iran has a responsibility to protect the diplomatic missions present in its country and the personnel stationed at them," White House spokesman Jay Carney said in a statement.

The European Union, New Zealand and Poland have also condemned the attack.

Commenting on the attack, Chinese Foreign Ministry spokesman Hong Lei Wednesday said the "safety and dignity" of diplomatic personnel and organizations should be ensured and safeguarded.

VietNamNet/Xinhuanet