A submariner who tried to pass secrets to Russian agents was in custody last night after admitting his crime.
Petty Officer Edward Devenney, 30, was caught in an MI5 sting after trying to hand over information that could be useful to the enemy, the Old Bailey heard.
The court was told how Devenney, inset, had been willing to betray the movements of Royal Navy crews by passing on code-breaking technology as well as operational details relating to HMS Trafalgar and the sailing dates of two nuclear submarines.
He contacted a foreign embassy to try and pass the details of the programmes used to encrypt secret information to the Russians. But the two people he met were MI5 officers posing as foreign agents.
During a brief hearing Devenney spoke only to confirm his name and enter pleas. The sailor from Northern Ireland pleaded guilty to collecting information for a purpose prejudicial to the safety or interests of the state, which could be useful to an enemy.
He also admitted a second charge that as a petty officer he "wilfully misconducted himself" by communicating with a foreign power with the intention of harming the Royal Navy.
Prosecutor Mark Dennis QC said: "One of the issues is the damage or potential damage and realistically it is potential damage caused to the national interest."
Devenney, who had a promising career in the Navy, had been sponsored through a degree in electronic engineering and passed exams required for a commissioned officer's course.
Yet before his arrest he was obsessively posting as many as 40 tweets a day, revealing details on everything from British nuclear capability to his operational duties.
He was remanded in custody until 12 December for sentencing.