A salsa dancing Army interpreter who worked for Britain's top general in Afghanistan was today found guilty of spying for Iran.
Daniel James, who had access to the highest echelons of the Nato mission in Kabul, was caught red-handed betraying his country in a series of coded emails.
The Iranian-born corporal, a flamboyant fantasist who styled himself "General James", believed he had been denied promotion because of racism and jealousy, the Old Bailey heard.
He told one colleague: "They will have their comeuppance."
James also needed money. He was £25,000 in debt and had four mortgages on flats in Brighton - although he later claimed he would not give away secrets for a million pounds.
But his treachery could have cost the lives of British soldiers, the court heard.
Prosecutor Mark Dennis QC said it was "the height of betrayal".
Today James, a Territorial Army soldier who moved to Britain as a teenager and became a salsa dance instructor and club owner, was found guilty of one count under the Official Secrets Act.
The charge related to sending emails to his Iranian contact.
Jurors were still deliberating on a second charge under the Act relating to a USB memory stick containing secret documents that was found in his possession, as well as a third count of misconduct in public office.
Judge Mr Justice Roderick Evans told the jury he would accept majority verdicts on the outstanding charges.
James looked straight forward as the verdict was returned.
The court heard that senior intelligence officers believed that if he had not been arrested his betrayal could ultimately have cost the lives of UK soldiers and even endangered the security of Britain itself.
In May 2006 James went to work for General David Richards, who has since become head of the British Army, and at the time headed the Nato-led International Security Assistance Force, a 37-nation coalition comprising 35,000 troops.
He had level one security clearance to move about the base in Kabul and was issued with a "yellow card" detailing General Richards' daily schedule.
On one occasion, James even walked alongside and took pictures of then prime minister Tony Blair on a visit to the base.
James mixed freely with military top brass and senior Afghan politicians and in August met Colonel Mohammad Hossein Heydari, military attache at the Iranian embassy in Kabul.
The court heard that the corporal began sending the colonel coded emails, and told him: "I am at your service."
But jurors have been told that he was arrested before he could become a fully-fledged agent.
James, 45, of Cliff Road, Brighton, denied being a spy, claiming he remained a loyal soldier.
The Old Bailey has heard he was found with sensitive documents about troop movements and munitions, stored on a computer memory stick, when he was arrested.
Pictures of a Predator spy plane were found in his room, jurors have been told, but James claimed the only "Predator" he had heard of was Arnold Schwarzenegger.
He says the emails were part of an attempt to set up a gas deal between Iran and Afghanistan - which he hoped would promote trade and peace between Washington and Tehran - while the secret documents were given to him to translate.
Mark Dennis QC, prosecuting, said: "During the latter part of 2006, the defendant's loyalty to this country wavered and his loyalties turned to Iran, the country of his birth.
"He turned his back on those with whom he was serving in Afghanistan and sought to become an agent for a foreign power."
He said he was "caught red-handed" by his secret email traffic and was seeking to pass on information useful to insurgents and their backers.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies