David McBride, who helped expose allegations of war crimes committed by Australian soldiers in Afghanistan, has pleaded guilty to leaking classified information.
Outside court, a defiant McBride said he saw this as "the beginning of a better Australia" and maintained he wanted to shine a light on wrongdoings.
"I stand tall and I believe I did my duty," the former military lawyer told supporters in Canberra on Friday.
McBride entered the pleas after losing pre-trial arguments over a public interest element to the charges he faced.
David McBride told supporters: "I stand tall and I believe I did my duty."
He will remain on bail and be sentenced next year.
His wife Sarah said it had been an emotionally and financially draining fight, and while their two daughters had been through a hell of a lot more than anyone should be going through, she wasn't giving up hope.
"He's done the right thing, I've said that from the beginning," she said.
"Truth and justice will prevail and I'm incredibly proud of him."
McBride's lawyer Mark Davis said they retained the right to appeal even though he pleaded guilty.
McBride sought to argue his oath to the defence force to "protect and serve" meant he needed to act in the public interest - even if that meant disobeying an order, which prosecutors rejected.
Justice David Mossop shot down McBride's argument, saying there was no mention of public interest in the military oath.
He also refused a push from McBride's team to have classified information go before the jury, ruling that documents remain redacted.
Davis said the decisions meant his client had no option but to plead guilty.
"The removal of evidence makes it impossible for us realistically to go to trial," he said.
"It's a sad day and a difficult day for us to advise David on his options this afternoon and he embraced it."
Davis said the ruling that McBride only had a duty to follow orders and not act in the Australian public interest was "a very narrow understanding of the law".
He again made reference to the Nuremberg trial, which took place after World War II and held prominent Nazis to account for their crimes.
"We all know how military law has been judged since then," he said.
The war crimes tribunal rejected the argument German officers could be freed from consequences because they were only following orders.
former military lawyer David McBride with supporters at the ACT Supreme Court in Canberra, Thursday, October 27, 2022. Hearing for former military lawyer David McBride who disclosed classified documents to the media throughout the middle of the last decade. (AAP Image/Mick Tsikas) NO ARCHIVING Source: AAP / Mick Tsikas
The leaked classified documents led to a series of reports alleging Australian special forces troops committed war crimes in Afghanistan.
An inquiry later uncovered credible information about 23 incidents of potential war crimes, which involved the killing of 39 Afghans and cruel treatment of two more between 2005 and 2016.