Sailor Edward Devenney's fruitless attempt at betrayal
The story of Royal Navy petty officer Edward Devenney's fruitless attempt at betrayal - by offering nuclear submarine secrets to MI5 agents posing as Russian spies - is a deeply personal tale, but also one that raises wider security questions.
The submariner's career as a communications specialist had been progressing well until he was faced with a rape charge - on which he was acquitted.
Soon after, he began to drink heavily and suffered from depression.
He left a course he was enrolled on, which might have led to his promotion.
Between 11 November 2011 and 5 January 2012, he was recorded as late for duty or absent without leave on four occasions and warned that, if his behaviour did not improve by April, he would be discharged from the Royal Navy.
Embittered and resentful, he appeared to have decided he wanted to hurt the Navy.
During the night of 17 November, he made 11 phone calls to four different numbers attached to the Russian Embassy.
His lawyer claimed these came after a 12-hour drinking session.
Two days later, he took his phone onto the submarine HMS Vigilant and took photos of code material for the military's "crypto" secure communications system - again, his lawyer said, after a heavy night of drinking.
This material was kept in a safe secured by a combination lock and key which was in turn kept in a secure compartment with restricted access.
He was supposed to have access to the room but not the safe.'Falklands' folder
The material - if put together with other intelligence - might have allowed another country to crack the encrypted communications of the British military including communications with Nato partners.
End Quote Edward Devenney in call to MI5 agent posing as Russian spy
Your accent sounds remarkably fake and like British intelligence”
One of the major security questions is whether, when his behaviour was clearly noticed as poor, he should have still been allowed to access secure rooms - especially after he had been drinking heavily.
But a more important question is how he got access to the safe and was able to take photos. It was a question left unanswered in court.
Edward Devenney kept the photos in a folder marked "Falklands War" on his computer and made further calls to the Russian Embassy.
He was then called by a man who identified himself as Dima.
Devenney was at first hesitant, telling him: "Your accent sounds remarkably fake and like British intelligence."
The man was indeed from British intelligence or, specifically, from the security service MI5 who clearly need to provide better accent training to their undercover officers.
It was not made clear in court how MI5 first learned of the submariner's intentions.
Devenney, though, was eventually convinced enough to continue to text and speak on the phone to Dima and another man, who identified himself as Vladimir.
Of the Navy, Devenney said: "I feel let down by them and think we can help each other."
He met the two men outside the British Museum on 28 January and they walked to a hotel.
Those who have seen the video that was made of the subsequent meeting say Devenney appeared remarkably relaxed and at ease, even cocky.
Devenney exaggerated his position and rank and made clear his willingness to provide secrets - but not for money.
"To be truthful, it sounds very petty but I'm just a bit pissed off with them," the petty officer told the men, claiming his promotion chances had been ended by budget cuts stopping a course.
Dima said he was head of a unit which dealt with work on the UK and Ireland for Russian intelligence while Vladimir said he was a case security officer for the UK.
End Quote Devenney text to MI5 agent
Vlad, this is a big step for me”
At the meeting, Devenney provided secret details of the planned movements of submarines.
This was important as the court was told that advance warning might allow another company to plan an operation which would identify the signature of a submarine and undermine its ability to move clandestinely.
The next day, he sent a text asking for assurances the men were who they said they were and, later, further texts to try and continue contact.
"Vlad, this is a big step for me," Devenney texted at one point.
In March he was arrested and police found evidence of another major security breach.
When they searched his property, officers found the spare key for the secure compartment aboard HMS Vigilant.
This should never have left the boat. How it was possible for him to take it away and for it not to be spotted is unclear.'No excuse'
In interviews, Devenney tried to convince police that he had been aiming to build a rapport with the two men in the hotel with a view to passing on details to the relevant authorities.
But this bluff was exposed when extracts of the video of the meeting were played to him.
"That was unbelievably stupid and I have no excuse for that," he said.
Eventually he decided to plead guilty to two charges which helped reduce his sentence - he was jailed on Wednesday for eight years.
Devenney's case was unique - driven by very personal factors - and his betrayal was caught before he could do any actual damage thanks to the work of MI5.
But it does raise serious questions for the Royal Navy as to how some of its secrets nearly escaped.