The imprisonment of the United Kingdom’s ambassador to Iran Rob Macaire during protests in Tehran was a “flagrant violation” of international law, the UK Foreign Secretary Dominic Raab said in a statement on Sunday.

“The arrest of our Ambassador in Tehran without grounds or explanation is a flagrant violation of international law,” Raab said.

The Iranian government can either “continue its march towards pariah status with all the political and economic isolation that entails, or take steps to deescalate tensions and engage in a diplomatic path forwards,” the foreign secretary added.

Macaire was allegedly arrested during a protest in front of Tehran’s Amir Kabir University, according to Iran’s semi-official Tasnim news agency.

Macaire was released a few hours later following a mediation effort by Iran’s Foreign Ministry, according to the report, adding that he will be summoned on Sunday for further investigation.