Iran has summoned the British ambassador to protest his "unconventional behavior and attendance at illegal rallies" in Tehran held days after the shooting down of a Ukrainian passenger plane near the Iranian capital.
The deputy foreign minister and director general for the European affairs of the Iranian Foreign Ministry summoned Robert Macaire on Sunday.
During the meeting, Macaire was reminded that the presence of foreign ambassadors in unlawful gatherings goes against their responsibilities as a political representative of their country and it violates the Vienna Convention on Diplomatic Relations of 1961.
The British ambassador was also told that the UK government should give an explanation for the incident.
Iranian media reported late on Saturday that security forces have arrested the British ambassador as he was trying to foment unrest in the streets of Tehran.
Iranís Tasnim news agency said Macaire had been briefly arrested during a protest in front of the Amir Kabir University in downtown Tehran, where he was organizing and provoking the people angry at the governmentís handling of the aftermaths of the plane crash.
The ambassador was released several hours later, the agency reported.
Britainís Foreign Secretary Dominic Raab issued a statement condemning the arrest of Macaire, saying it had been carried out "without grounds or explanation."
All the 176 people on board the Ukraine International Airlines (UIA) Boeing 737-800 died in the crash on Wednesday just after take-off from the Imam Khomeini International Airport.
On Saturday, Iranís General Staff of the Armed Forces said in a statement that the Ukrainian plane was shot down "unintentionally" due to "human error" and that those guilty would be brought to military justice.
The statement added that "by pursuing fundamental reforms in operational processes at the armed forcesí level, we will make it impossible to repeat such errors."
Later on Saturday, Head of the Aerospace Division of the Islamic Revolution Guards Corps (IRGC) General Amir-Ali Hajizadeh accepted full responsibility for the downing of the aircraft and said he had "wished he could die" after being informed of the matter on the same day the crash took place.
Hajizadeh said he had notified relevant authorities immediately but that public announcement of the matter was not made before an investigation of Iranís General Staff of the Armed Forces as required by existing procedures.
UK envoy arrested as unknown foreigner: Iran deputy foreign minister
Iranian Deputy Foreign Minister for Political Affairs Abbas Araqchi also on Sunday confirmed the arrest of Macaire as an "unknown foreigner in an illegal gathering" but said he was freed soon after being identified.
"He wasnít detained, but arrested as unknown foreigner in an illegal gathering. When police informed me a manís arrested who claims to be UK Amb, I said IMPOSSIBLE! only after my phone conversation w him I identified, out of big surprise, that itís him. 15 min later he was free," Araqchi said in a post on Twitter.
His tweet came after High Representative of the EU for Foreign Affairs and Security Policy Josep Borrell Fontelles expressed his deep concern over the "temporary detention of the UK Ambassador" in Tehran.