TEHRAN, Iran (AP) — An Iranian official who served a 17-year sentence for allegedly spying for the United States has died at the age of 86.

The official IRNA news agency quoted the wife of Abbas Amir-Entezam as saying that he died at home on Thursday after a having a seizure due to illness.

He had served as the spokesman and deputy of Mehdi Bazargan, the first prime minister after the 1979 Islamic Revolution. In December 1979, Amir-Entezam was convicted of spying for the United States and sentenced to life in prison. He was released 17 years later.

His conviction was based on documents seized from the U.S. Embassy when hard-liners stormed it at the height of the revolution. Amir-Entezam denied the allegations, and was widely known as the longest-serving political prisoner in Iran.