The case against a member of the armed forces accused of sharing "highly sensitive military information" has been dropped.
Thomas Newsome, 37, was charged over an alleged breach of the Official Secrets Act and was due to face trial in 2024.
But prosecutors dropped the case in light of a report about the defendant's mental health and the length of time he had already spent in custody.
It means Mr Newsome - who denied wrongdoing - has been formally cleared.
The latest hearing in his case took place at the Old Bailey on Friday, but the prosecution offered no evidence against the defendant.
Prosecutor Tom Little KC said Mr Newsome had been suffering from a mental health condition which was linked to the reasons for his prosecution.
Mr Newsome's alleged offence arose from "grievances" with his employer, the court heard.
An earlier hearing heard claimed Mr Newsome, who is from Poole in Dorset, shared a 10-page document after returning to the UK from an unspecified overseas deployment on 17 April.
Information about his unit and posting cannot be disclosed for legal reasons.
Mr Newsome was accused of making the "damaging disclosure of information relating to defence" to two senior officers and a civilian living outside the UK.
A second allegation related to possession of a USB stick said to have contained "highly sensitive material".
Mr Newsome had been due to face a trial at Kingston Crown Court on 8 April next year.
He had appeared at the Old Bailey by video link from his home for the brief hearing and pleaded not guilty before the prosecution signalled they would not pursue the case.