Iranian government media reported that the British ambassador to Iran, Rob MacAyer, left the country after his arrest and detention for a short period.
The official IRNA news agency said Macair left the country after receiving advance notice.
Macair was detained after participating in the protests last Saturday in Tehran, against the background of Iran accidentally shooting down a Ukrainian passenger plane, killing 176 people, but these protests quickly turned into anti-government demonstrations.
For its part, the British Foreign Office said that Macair's departure to London was routine, and was planned before his arrest in Tehran, and confirmed that he would return to Iran soon.
Last Monday, the British Foreign Ministry summoned the Iranian ambassador in London to express its "strong objections" to the arrest of the British ambassador.
A spokesman for the British Prime Minister said the arrest was "an unacceptable violation of the Vienna agreement," adding that the UK had asked Iranian Ambassador Hamid Baidi Nejad guarantees that this would not happen again.
Ambassador Rob MacAir had said that he went to the declared gathering in honor of the victims of the crash of the Ukrainian civil plane, which was hit "error" by an Iranian missile.
British media reported that the Iranian authorities arrested the British ambassador to Tehran on Saturday and then released him, against the background of photographing the demonstrations taking place in the Iranian capital. Anti-regime in the country.