An Iranian negotiator who helped clinched the 2015 nuclear deal has been sentenced to five years in prison after being convicted of espionage in Iran.

Abdolrasoul Dorri Esfahani, who has dual Iranian-Canadian citizenship, is known to be have been the member of Iran’s team of nuclear negotiators. He worked on a team focusing on ensuring economic sanctions were lifted against Iran as part of the deal.

"The conviction of a member of the nuclear negotiation team who has been arrested before and released on bail has been confirmed in the Tehran provincial appeals court," an Iranian semi-official news agency reported Wednesday.

His sentence was reported by Iranian news agency Tasnim, which is thought to be close to Iran’s Revolutionary Guard – a hard-line faction following the orders of Supreme Leader Ayatollah Ali Khamenei and often involved in detaining Iranians with links to the West.

Iran does not recognize dual nationals and such individuals have faced secret charges behind closed doors before Iran’s Revolutionary Court, which rules in cases involving attempts to overthrow the Islamic regime.

The United Nations recently criticized Iran for detaining nationals with dual citizenships, calling it an “emerging pattern” since the nuclear deal was signed.

Esfahani was reportedly detained in 2016 but was later granted bail – a rare occurrence in Iran for those accused of serious crimes.

He had a history of working for the Iranian government, including working at The Hague, Netherlands, where he mediated disputes between Iran and the U.S. government over pre-1979 Islamic Revolution purchases of military equipment from the U.S. He also served as an adviser to the head of Iran’s Central Bank.

Other dual nationals detained in Iran include Chinese-American student Xiyue Wang, who was sentenced for 10 years for allegedly “infiltrating” the country as he was conducting university research on an Iranian royal dynasty of the 18th century.

Nazanin Zaghari-Ratcliffe, a British-Iranian woman, was also sentenced to five years behind bars after being found guilty of conspiracy to topple the Iranian government while traveling in the country with her young daughter.

Multiple other dual nationals have also been found guilty and imprisoned based on espionage charges in Iran.

The Associated Press contributed to this report.