A soldier "wholly unsuitable" for the Army has been jailed for terrorism offences after leaking key details of operational procedures.
Matthew Conroy, 25, from Shepherd's Bush, West London, also released detailed information about other military personnel - and was said to be "a source of concern" to the Army almost as soon as he joined.
Kingston Crown Court heard he had enlisted in the British Army Reserves in January 2017 and began regular British Army training in January 2018 with the Adjutant General's Corps attached to the Royal Lancers Regiment.
But the quality of Conroy's "work, performance and attitude" remained poor until he was discharged from the Army on 28 February this year on the grounds that he was "temperamentally unsuitable".
Then, just two months later, on 1 May, a range of national and international organisations were emailed a number of military documents. Conroy was identified as the sender of the email, using an email address set up the same day.
He was arrested on 4 May at the home he shared with his mother and brother. When police raided the house, they found he had printed out a copy of the Official Secrets Act.
When Conroy left the Army, his email accounts and MODNET (military intranet) access were supposed to be disabled but there was a delay in the process.
"As a result, the defendant continued to have access to some military information after he left the army," Alistair Richardson, prosecuting, said.
The court heard Staff Sergeant Christopher Hill, of the Royal Lancers Regiment, recalled a conversation from July 2019 when Conroy said he "would not have to worry about money" as he would be able to sell details of camp security.
Staff Sergeant Hill reported his concerns about that conversation by email to more senior officers - but no restriction on his access to sensitive material was put in place.
Conroy pleaded guilty to six charges of collecting and publishing information about HM Armed Forces useful to anyone committing or preparing an act of terrorism.
Six of the seven documents were said to contain information of a kind likely to be useful to a person committing of preparing an act of terrorism, although the judge accepted there was no terrorist motivation.
The documents exposed operational orders, organisational structures and personal data of serving military personnel and associates.
Mr Richardson said: "A breach of any one of these individually would be a matter of considerable concern for the British military.
"Collectively, they give significant insights into the operational mechanics of a specific operation that are not in the public domain.
"The information is of potential intelligence and targeting value to hostile actors or terrorist organisations who wish to target the United Kingdom."
Judge Peter Lodder QC said Conroy was "regarded as a threat to yourself and to your unit" and added: "There is a record that you showed signs of suicidal ideation, had a high opinion of yourself and an inability to make judgements appropriately.
"It is clear that you were wholly unsuitable for the Army."
Major Adam Wooster described the results of one of Conroy's initial training courses as "the worst he had ever seen".
And a psychiatrist also told the court that Conroy had borderline personality disorder and narcissistic tendencies which echoed notes and reports in Army records which led to his discharge.
Jailing him for three years, with an extended year on licence, the judge said: "You declined to answer questions in interview so your exact motivation was, at least initially, unclear.
"Recently you offered an explanation to the effect that it was out of frustration with the Army, an explanation which you re-iterated in your letter to me.
"Whatever your motive, it is clear to me that you had planned these actions for some time, you were fully aware of the seriousness of your actions and of the inevitable security risks that followed from those actions."
When analysing Conroy's electronic devices, police also found two videos of extreme pornography involving bestiality, the first of which contravened section 63 of the Criminal Justice Act 2008.
The first involved a chicken, and was backed up on to the family computer from Conroy's mobile phones, while the second involved an orangutan.
He was jailed for four months concurrently for the offences.