A judge in Iran has sentenced a US-Iranian man to death for spying for the CIA, media reports saidtoday, exacerbating Tehran-Washington tensions already high in the face of Western sanctions on the Islamic republic's nuclear programme.

Amir Mirzai Hekmati, a 28-year-old former Marine born in the United States to an Iranian family, was "sentenced to death for cooperating with a hostile nation, membership of the CIA and trying to implicate Iran in terrorism," the judge in Tehran ruled, the Fars and ISNA news agencies reported.

Hekmati has 20 days to appeal, ISNA quoted chief prosecutor Gholam Hossein Mohseni Ejei as saying, without specifying when the sentence was handed down.

The accused was shown on state television in mid-December saying in fluent Farsi and English that he was a Central Intelligence Agency operative sent to infiltrate Iran's 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 grandmothers.

His father, a teacher in the US state of Michigan, said Hekmati was not a spy. Relatives said they had tried in vain to hire different Iranian lawyers for him, rather than the government-appointed one.

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.

Hekmati was tried as an Iranian citizen, not a US one, because Iran does not recognize dual nationality.

The United States has demanded Hekmati's release.

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

The death sentence comes after the case of three other Americans who were held in Iran on spying charges after hiking in 2009 along the unmarked Iran-Iraq border. All three were eventually released, one in 2010 and the other two in September 2011, despite being sentenced to eight years in prison.

Hekmati's case, though, comes as the temperature rises between Tehran and Washington over US-led moves to hit Iran's oil exports as part of new sanctions to be imposed over its controversial nuclear programme.

Analysts and some Iranian officials have said the latest round of sanctions have hit Iran's economy hard. But the country's supreme leader on Monday dismissed claims that the strategy would prevent Tehran from pursuing its goals.

"Western officials have declared on a number of occasions that, with sanctions and pressure, they want to discourage the people and lead officials to renounce their plans," Ayatollah Ali Khamenei said in comments broadcast on state television.

"But they are mistaken and they will not achieve their objectives," he added.

Last month, Iran showed off what it said was a CIA drone it captured using cyberwarfare.

It also said Sunday it had arrested an unspecified number of "spies" who allegedly sought to carry out US plans to disrupt parliamentary elections in March.

The suspects were not identified by name or nationality and, as with numerous previous similar announcements, the accusation was not publicly substantiated.

Washington, for its part, said in October it thwarted a plot allegedly hatched in Tehran to assassinate the Saudi ambassador. President Barack Obama last month also signed into law new sanctions targeting Iran's central bank.

The United States and its allies accuse Iran of seeking a nuclear weapons capability.

Iran, though, insists its programme is exclusively for peaceful ends.

It has threatened to close the strategic Strait of Hormuz at the entrance to the Gulf -- a chokepoint for 20 percent of the world's oil -- if it is threatened militarily or by sanctions.

US Defence Secretary Leon Panetta warned on Sunday that any such move would cross a "red line" and "we would take action and reopen the strait."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.