An American man, who was arrested last month with charges of working for the Central Intelligence Agency (CIA), has been sentenced to death by an Iranian court.

The court pronounced the death sentence on Amir Mirzayi Hekmati for allegedly cooperating with a hostile nation, trying to implicate Iran in terrorism and for holding a CIA membership.

Hekmati, 28, was born in Arizona and his family is of Iranian origin.

He allegedly had served at the U.S. military bases in Iraq and Afghanistan before arriving in Iran for the intelligence mission.

Last month, Iran's state TV showed him allegedly confessing and describing his mission, said the Fars news agency.

According to Iranian officials, the cover of Hekmati was blown by agents for Iran who spotted him at the U.S.-run Bagram military air base in neighboring Afghanistan.

His family and the U.S. denied the accusations against him. We are deeply concerned that Amir is not receiving a fair trial and has not been afforded due process, a family statement released last week said.

We have struggled to provide Amir with an attorney in Iran. We have sought to hire at least 10 different attorneys in Tehran to no avail, the statement added.

The U.S has demanded Hekmati's release.