Dozens of hard-line militia members gathered outside the British Embassy in Iran on Sunday, chanting “Death to England,” and calling for the ambassador to be expelled and the embassy closed.

The protests in Tehran followed British Ambassador Rob Macaire’s arrest for attending a Saturday night vigil for the victims of the Ukrainian passenger plane that Iran admitted it accidentally shot down earlier this week. All 176 people on board were killed.

Macaire, who has been Britain’s envoy to Iran since March 2018, left the vigil after it became a demonstration -- but Iranian authorities later arrested him on allegations that he helped to incite the anti-government protest.

TRUMP ISSUES WARNING TO IRAN: 'DO NOT KILL YOUR PROTESTERS... THE USA IS WATCHING'

Police released him after three hours but his arrest outraged the British government.

British Foreign Secretary Dominic Raab derided Macaire’s arrest as a “flagrant violation of international law.”

Alaeddin Boroujerdi, a member of Iran’s parliamentary committee on national security and foreign policy, accused the ambassador of organizing Saturday night’s protests. Iranian state media echoed the claim.

Iranian foreign minister Seyed Abbas Araghchi on Sunday denied that investigators knew Macaire’s identity when he was arrested.

“He wasn’t detained, but arrested as unknown foreigner in an illegal gathering,” Araghchi tweeted. “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.”

Macaire denied taking part in any demonstrations, tweeting that he had gone to the event advertised as a vigil for the victims of the Ukraine airline crash.

CLICK HERE TO GET THE FOX NEWS APP

“Normal to want to pay respects- some of victims were British,” he wrote. “I left after 5 mins, when some started chanting.”

The Associated Press contributed to this report.