Tehran: An American ex-Marine, who also holds Iranian citizenship, has been sentenced to death by an Iran judge for spying for the CIA, as reported on Monday.

Amir Mirzai Hekmati, 28, was "sentenced to death for cooperating with a hostile nation, membership of the CIA and trying to implicate Iran in terrorism," the verdict said, according to sources.

Hekmati, who was born in the United States to an Iranian immigrant family, was shown on Iranian state television in mid-December saying in fluent Farsi and English that he was a Central Intelligence Agency operative sent to infiltrate the Iranian intelligence ministry.

He had been arrested months earlier.

Iranian officials said his cover was blown by agents for Iran who spotted him at the US-run Bagram military air base in neighbouring Afghanistan.

But Hekmati's family in the United States told US media he had travelled to Iran to visit his Iranian grandmother and he was not a spy.

In his sole trial hearing, on December 27, prosecutors relied on Hekmati's "confession" to say he tried to penetrate the intelligence ministry by posing as a disaffected former US soldier with classified information to give.

The United States has demanded Hekmati's release.

The State Department said Iran has not permitted diplomats from the Swiss embassy -- which handles US interests in the absence of US-Iran ties -- to see Hekmati before or during his trial.