A military whistleblower has pleaded guilty to leaking classified defence documents, and is set to learn his fate next year.
David William McBride pleaded guilty in the ACT Supreme Court on Friday to three charges.
The charges relate to the theft and disclosure to journalists of classified documents, which detailed alleged misconduct by Australian troops in Afghanistan.
A later inquiry uncovered credible information of 23 incidents of potential war crimes, which involved the killing of 39 Afghans and cruel treatment of two more between 2005 and 2016.
The report found 25 soldiers were perpetrators or accessories - some on a single occasion and some on multiple.
McBride was scheduled to face a jury trial on Monday but it has now been vacated.
Speaking to supporters and media outside of court on Friday, McBride said: "I stand tall and I believe I did my duty."
One of McBride's lawyers, Mark Davis, also addressed the crowd, saying recent orders had made it "impossible for us to realistically go to trial".
"An extra burden today was that, the crown, the government was given authority to bundle up evidence and run out the back door with it," Mr Davis said.
"That was a fatal blow in conjunction with the decision that was made a few days ago that limits what we can say to the jury on David's behalf."
The case took a turn on Thursday when Justice David Mossop said he would not direct jurors that an oath of allegiance to the sovereign, sworn by McBride as a member of the military, meant his duty extended to acting in the Australian public interest even when in contravention of a lawful order.
The court had heard two days of legal argument about whether this oath gave rise to a duty for McBride to act and leak the documents.
Stephen Odgers SC had said the issue of duty had "real significance" for the defence case.
On Friday, Justice Mossop ordered that a series of classified documents key to the defence case could not be used as evidence in the upcoming trial.
The court was closed to the public and to journalists for several hours while this was debated.
However, in open court, Andrew Berger KC, lawyer for the attorney-general, said the classified information "originates from or discloses the position of one or more of Australia's military partners".
"[The documents] could, if disclosed, cause significant prejudice with the foreign partner to which it originated ... as well as foreign partners in general," he told the court.
"The public interest in preserving the confidentiality significantly outweighs the public interest in being used as evidence in these proceedings."
On Friday, McBride entered pleas of guilty to one count of dishonestly appropriating property, and two counts of communicating documents relating to naval, military, or air force information to other persons not in the course of official duty.
The judge ordered a report to assess McBride's suitability for an intensive correction order.
The case was adjourned to later this month, and is set to go to sentencing next year.
IN OTHER NEWS: