Iran declared the British ambassador to Tehran "persona non grata" on Tuesday, calling for him to be expelled for his alleged role in recent anti-government protests.
Iran's judiciary spokesman said Robert Macaire had played a "provocative role" when he attended a vigil at the weekend for passengers killed in the passenger jet crash last week, amid ever-worsening tensions between the UK and Iran.
Mr Macaire said he left the vigil as soon as the protests began and was arrested on his way to the embassy, in violation of the Vienna Convention. He was detained for several hours, before Iran's foreign ministry intervened and arranged for his release.
An effigy of the ambassador, who took up the role two years ago, and a Union Jack flag were burned in Tehran.
"It is not acceptable for us to see that the British ambassador went outside the embassy and took part in an illegal gathering, filmed it and had a provocative role in its continuation," Gholam-Hossein Esmaili, the spokesman for Iran's judiciary, told reporters. "This person is persona non grata ... while people's expectations and international regulations necessitate his expulsion."
Iran's general prosecutor urged the government to expel the ambassador.
Ayatollah Ahmad Alamolhoda, a prominent hardline cleric, said expelling the ambassador would be "the best thing that can happen to him" as otherwise loyal supporters of general Qassem Soleimani, killed in a US drone strike earlier this month, would "chop him to small pieces".
Dominic Raab, the Foreign Minister, said the UK government had received no formal notification that Mr Macaire would be expelled, adding that any such action would be "regrettable".
The UK has attempted to distance itself from the US decision to assassinate Soleimani, widely considered to be the second most important figure in the Islamic Republic. Britain was not given advance notice of the plan.
Tehran, however, has kept up the pressure on the UK, which it often refers to as "Little Satan" to the US's "Big Satan".
The ministry of foreign affairs issued a statement calling on the UK embassy in Tehran to "stop any meddling and provocative measure immediately".
"The people of Iran do not accept foreign interference, particularly from governments with a record of colonialism, such as Britain," it said.
The judiciary also announced the arrest of a number of people over the downing of the Ukranian Airlines jet by Iran's missile defence system, which killed all 176 on board.
Justin Trudeau, prime minister of Canada, which lost 63 nationals in the crash, took an extraordinary swipe at Mr Trump, saying the victims would be with their families if not for the US president's decision to target Soleimani.
"I think if there were no tensions, if there was no escalation recently in the region, those Canadians would be right now home with their families," Mr Trudeau said.