LONDON -- 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.

Also on HuffPost:

Loading Slideshow...
  • Abu Qatada arrives back at his residence in London after being freed from prison, Tuesday, Nov. 13, 2012. (AP Photo/Matt Dunham)

  • Protesters hold up a banner calling for the extradition of Abu Qatada outside his residence in London as he return from imprisonment, Tuesday, Nov. 13, 2012. (AP Photo/Sang Tan)

  • Abu Qatada returns to his residence in London, Tuesday, Nov. 13, 2012. (AP Photo/Sang Tan)

  • Abu Qatada, right, returns to his residence in London after being freed from prison, Tuesday, Nov. 13, 2012. (AP Photo/Matt Dunham)

  • Abu Qatada, left, gets out of the rear of a vehicle as he returns to his residence in London, Tuesday, Nov. 13, 2012. (AP Photo/Matt Dunham)

  • Islamic cleric Abu Qatada is driven out of Long Lartin high security prison in Worcestershire, England, after winning the latest round in his battle against deportation, Tuesday Nov. 13, 2012. (AP Photo/ Rui Vieira/PA)

  • The vehicle carrying Islamic cleric Abu Qatada is driven out of Long Lartin high security prison in Worcestershire, England, after winning the latest round in his battle against deportation, Tuesday Nov. 13, 2012. (AP Photo/ Rui Vieira/PA)

  • Islamic cleric Abu Qatada is driven out of Long Lartin high security prison in Worcestershire, England, after winning the latest round in his battle against deportation, Tuesday Nov. 13, 2012. (AP Photo/ Rui Vieira/PA)