A Canadian-Iranian accountant who helped advise Iran’s negotiation team in talks that led to the 2015 nuclear agreement with the United States and other big powers has been sentenced to five years in prison for spying.

News of the conviction and sentence, reported on Wednesday by Iran’s state-run Tasnim News Agency, did not identify the defendant by name, describing him only as a “spy who had infiltrated the team.”

But after news of the arrest first emerged in August 2016, Iranian lawmakers critical of the nuclear agreement identified the defendant as Abdolrasoul Dorri Esfahani, a dual citizen of Canada and Iran.

Mr. Esfahani was an adviser to Iran’s central bank and was believed to have helped the country’s nuclear negotiators bargain for the sanctions relief contained in the 2015 nuclear agreement.