A former British army interpreter in Afghanistan who was convicted of espionage was sentenced to 10 years in prison Friday.

Iranian-born Daniel James, who translated for NATO's commander in Afghanistan, was sentenced after the Crown Prosecution Service said it would not seek a retrial on two other charges on which a jury deadlocked.

James was stationed in Afghanistan in 2006 as an interpreter for Gen. David Richards, then-NATO commander in the country. Richards has since been appointed as the next head of the British army.

Prosecutors said James began sending coded e-mails after meeting Col. Mohammad Hossein Heydari, military attache at the Iranian Embassy in Kabul, in late August 2006. One allegedly read, "I am at your service."

Justice Roderick Evans said James should never have been in such a sensitive position because of his nationality, his disenchantment with the army and his narcissistic personality.

"The gravest part of your offending and what made this case unique was that you engaged in this activity when you were actually serving in a war zone," Evans said.

There was no evidence that James had damaged any British or NATO operations, the judge said, but "the potential for serious harm, had this relationship between you and the Iranian authorities developed, was immense."

A jury convicted James earlier this month on the espionage charge, but the jury could not decide on a charge related to a memory stick containing secret documents that was found in his possession, and a charge of misconduct in public office.

Prosecutors said James had debts of 25,000 pounds (US$38,000) and mortgages on four properties in Britain's south coastal city of Brighton.

Born Esmail Gamasai in Tehran, James came to Britain at age 15 and became a British citizen.

After leaving college without qualifications, he worked as a casino croupier and became a dedicated bodybuilder, once competing in a Mr. Universe contest. He joined the Territorial Army, a reserve force, in 1987.

In Brighton, James was caught up in the dance scene, billing himself as "Danny James, king of salsa."

His fluency in English, Farsi, Dari and Spanish led to his appointment as Richards' translator.