Updated

A Royal Navy submariner on Tuesday admitted collecting secret coding programs that could aid an enemy of the state, and meeting with people he believed were Russian agents.

Petty Officer Edward Devenney was arrested earlier in a British intelligence sting operation. He was charged with communicating information that could be "directly or indirectly useful to the enemy," in breach of the Official Secrets Act.

Devenney, 30, from Northern Ireland, pleaded guilty at a court hearing to gathering details of "crypto material" -- programs used to encrypt secret information. He also admitted misconduct in a public office in relation to a meeting with two people he thought were from the Russian secret service.

He acknowledged discussing the movement of British nuclear submarines with the pair, who were in fact members of the British secret service.

Devenney will be sentenced Dec. 12.