A whistleblower who helped expose allegations of Australian war crimes in Afghanistan has been sentenced to five years and eight months in jail.
David McBride pleaded guilty to stealing and sharing military secrets on the eve of his trial last year, after legal rulings sunk his defence.
An ex-military lawyer, McBride said he felt a moral duty to speak up.
A landmark inquiry later found evidence that Australian forces had unlawfully killed 39 Afghans during the war.
McBride's case has sparked uproar in Australia, putting a spotlight on what some say are flimsy whistleblower protections and slow progress towards prosecuting soldiers alleged to have killed with impunity under its flag.
McBride, 60, admits he gave troves of document to the Australian Broadcasting Corporation (ABC), saying he was concerned about the attitudes of commanders and what he then thought was the "over-investigation" of troops, the court heard.
But instead the information he provided underpinned a series of reports in 2017 called The Afghan Files, which gave unprecedented insight into the operations of Australia's elite special forces in Afghanistan, and contained allegations of war crimes.
Prosecutors argued McBride was motivated by "personal vindication", and that the way he gathered, stored and then leaked the documents endangered Australia's national security and foreign policy.
But McBride's lawyers asked for leniency, saying he shared the information with "honourable" intentions and out of a sense of personal duty.
During sentencing in the nation's capital on Tuesday, Justice David Mossop agreed McBride was of "good character" but said that he seemed to have become obsessed with the correctness of his own opinions. Sharing military secrets was "a gross breach of trust" for which he has shown "no contrition", he added.
McBride will be eligible for release on parole after 27 months.
After the sentence was read out, some in the public gallery shouted "shame on you" towards the judge as he left the bench.
His support dog nearby, McBride hugged his friends and family before being led off into custody.
He has maintained that his leak was justified as it had ultimately exposed wrongdoing.
"I did not break my oath to the people of Australia and the soldiers that keep us safe," he said on Tuesday ahead of his sentencing, addressing a crowd of supporters which included relatives of Wikileaks founder Julian Assange and fellow whistleblower Jeff Morris.
Files smuggled over 18 months
Even before he became one of Australia's most high-profile whistleblowers, McBride led a colourful life.
After graduating from Oxford University with a law degree, he started his career with a stint in the British army. Leaving after reaching the rank of captain, he then tried his hand at everything from private security to reality TV and politics, before coming full circle and joining the Australian Defence Force (ADF).
As a legal officer, he did two tours of Afghanistan in 2011 and 2013, the latter with the special forces. It was then that he began to form the impression that "a line had been crossed" by commanders.
Over the next few years, while suffering from undiagnosed post-traumatic stress disorder (PTSD) and abusing drugs and alcohol, McBride said he became more and more convinced he needed to speak up.
Working late into the night at an army base near Canberra, he started covertly copying hundreds of sensitive documents, smuggling them home in a backpack over 18 months.
He tried an internal complaint first. When that failed, he went to the police and the defence minister, before turning to the press.
He believed the dossier he compiled would show the ADF's chain of command was so concerned about the perception of unlawful killings that they were scapegoating soldiers and undermining special forces' confidence to do their work.
Instead, ABC journalist Dan Oakes found they contained evidence that Australian forces had committed war crimes and lied to conceal them.
"The more I looked into it, I couldn't conceive how anyone would think these guys were being too tightly monitored. It was precisely the opposite," he recently told the Four Corners programme.
"What happened out in the field stayed in the field."
The Afghan Files included revelations military leaders themselves had concerns about a "warrior culture" within the force, and details of how soldiers were allegedly covering up the unlawful killings of unarmed men and children - including a six-year-old boy who was allegedly shot in his sleep in 2013.
Until that point, there had been very little reported about allegations of war crimes.
McBride was quickly fingered as the man behind the leak and he fled to Spain shortly before the Australian Federal Police (AFP) descended on his apartment. There officers found four plastic tubs filled with classified documents stashed in a cupboard.
After a year in hiding, McBride returned to Australia and was charged with stealing Commonwealth property, breaching the Defence Act and disclosing confidential information.
Police also started building a case against Mr Oakes and his producer Sam Clarke. In 2019, they dramatically raided the ABC's Sydney headquarters and seized documents.
It was an unprecedented moment in Australia which made headlines around the globe. Under public pressure, prosecutors ultimately decided against charging the journalists, arguing doing so would not be in the public interest.
Within a month, the findings of a landmark inquiry known as the Brereton report found credible evidence of unlawful killings of civilians and prisoners in Afghanistan from 2007 to 2013.
The government also set up the Office of the Special Investigator to begin criminal investigations into the allegations. Only one person has been charged so far.
But despite mounting pressure, the government refused to order prosecutors to drop the case against McBride.
'Chilling effect'
Australia has some safeguards for whistleblowers enshrined in law. But advocates have long complained that they're weak and also demand whistleblowers meet a raft of onerous requirements before they disclose information - some of which ironically make it easier for authorities to catch them.
McBride had initially planned to rely on those protections, but his legal team say they were forced to withdraw that defence after much of their evidence was struck out on national security grounds.
After failed attempts to convince Attorney General Mark Dreyfus to intervene and drop the prosecution - as Mr Dreyfus did in the case of fellow whistleblower Bernard Collaery in 2022 - McBride then tried to argue that he had a duty to leak the documents, because doing so was in the public interest.
But that defence too was scuppered by the judge, who ruled it had no legal basis and could not be put to a jury - a decision McBride's lawyer says they will appeal.
Advocates say McBride's case shows that whistleblower protections do not work, and will dissuade others from speaking up about wrongdoing.
"It is a stain on Australia's reputation that some of its soldiers have been accused of war crimes in Afghanistan, and yet the first person convicted in relation to these crimes is a whistleblower not the abusers," said Daniela Gavshon, Australia director at Human Rights Watch.
Among the critics were a raft of parliamentarians who called it a "perverse" outcome.
"The prison sentence handed to David McBride sends a chilling message to whistleblowers across Australia... We need better whistleblower protections urgently," said independent MP Allegra Spender.