Amir Hekmati, Iranian American, in Tehran court over US spy allegations (VIDEO)

An American man accused by Iran of working as a spy for the CIA went on trial in Tehran on Tuesday, the semi-official Fars news agency reported.

Amir Mirzaei Hekmati, a US-born Iranian American and former Marine, was in a closed court hearing when he allegedly “admitted that he received training in the United States and planned to imply that Iran was involved in terrorist activities in foreign countries” after his return, the report said.

Hekmati could receive the death penalty if convicted. Spying can lead to capital punishment only in military cases in Iran, the Associated Press reported.

More from GlobalPost: Iran war: Has it already begun?

The accused American confessed in trial to having links with the CIA but said did not have intentions to harm Iran. “I was deceived by the CIA ... Although I was appointed to break into Iran's intelligence systems and act as a new source for the CIA, I had no intention of undermining the country," Fars quoted Hekmati as saying.

Hekmati’s story stayed out of the public for months until a Iranian television broadcast showed a the detained American admitting he was sent by the CIA to infiltrate the Iranian intelligence ministry in Tehran.

Hekmati, 28, was born in Arizona to a family of Iranian descent. His family denied accusations of his son being a CIA spy and said the video confession is nothing more than "false information and forced confessions."

The Iranian Government told the family to “remain silent” about Hekmati’s arrest if they want him released, according to ABC News

"The Iranian government detained Amir on Aug. 29, 2011 without any charges, and urged our family to remain silent with the promise of an eventual release," the family said in a statement. "Amir has never had any affiliation with the CIA, and these allegations are untrue. Amir's family hopes that this misunderstanding can be resolved peacefully with Iran, and that Amir can be reunited with his family and friends in the US who miss him dearly and are praying for his safe return."

More from GlobalPost: Iran claims arrest of another CIA spy

The CIA has not publicly commented about Hekmati.

Current and former US government officials said in November that Iran had succeeded in uncovering the identities of several CIA informants, according to Reuters.

Iran said in May it had arrested 30 people on suspicion of spying for the US and later 15 people were indicted for spying for Washington and Israel.

Iran frequently accuses the US, other Western powers and Israel of spying and periodically says it has captured or executed people accused as spies, The New York Times reported