held in iran
Amir Hekmati, held by Iran on the charge of spying for the CIA, speaks in this undated still image taken from video in an undisclosed location made available to Reuters TV Jan. 9, 2012. REUTERS/via Reuters TV

A Muslim leader from Michigan said he was recently granted rare access to meet with Amir Hekmati, the U.S. military veteran who has been held in Iran for the past four years, Gulf News reported Friday. The visit has raised speculation that the Islamic Republic could be considering the release of Hekmati and other hostages in the lead-up to the historic nuclear deal reached between Iran, the U.S. and five other world powers in July.

Mohammad Ali Elahi, who leads a mosque in Dearborn, said he spent nearly an hour with Hekmati last week while he was visiting the country to attend a religious conference. Elahi, who in the past taught theology classes in Iran’s navy and was a family friend of Hekmati’s, said he was able to arrange the visit after meeting with members of Iran’s judiciary system.

Elahi said Hekmati was overall in good spirits and felt “more optimistic than ever about his case.” The meeting was in held in a private room without Iranian officials present.

Iran typically grants permission to visit prisoners only to immediate relatives.

The unprecedented visit comes as Iranian officials have hinted at the possibility of a prisoner exchange. The U.S. is holding 19 Iranian citizens accused of violating U.S. economic sanctions; Iran’s Foreign Ministry considers this detention unjust. U.S. officials have not commented on Iranian officials’ statements that a prisoner exchange is in the works.

Hekmati has been imprisoned for nearly four years, the longest time that any American has currently been held in Iran, Gulf News reported. He once faced the possibility of execution by hanging and has been denied the chance to speak with family members, including his ailing father in Michigan. Hekmati was visiting his grandmother, who lived in Iran, when he was arrested for allegations of spying for the CIA in 2011.

Hekmati is among several American citizens being held in Iran, including Jason Rezaian, formerly the Tehran correspondent for the Washington Post who has spent more than 13 months in prison for charges of espionage. Another American, Christian pastor Saeeda Bedini, was charged in 2013 for subverting national security by holding Bible classes in private homes.

American Congress and the Iranian Parliament have been preparing to vote on a historic nuclear deal reached in Vienna in July. The agreement could see a gradual lifting of sanctions on Iran in exchange for a promise from the Islamic republic to abandon its nuclear program. It has come under heavy pressure from hardliners in both the U.S. and Iran, although U.S. President Barack Obama has managed to secure the necessary votes in Congress to see the agreement pass.

Secretary of State John Kerry has said a deal with Iran could open the possibility of further cooperation with the country on a range of regional issues.