A former Australian military lawyer and captain in Britain's elite Special Air Service has been charged over the leak of documents exposing alleged unlawful government conduct.
David William McBride, 55, appeared in the ACT Magistrates Court on Thursday where he was charged with the leaks to journalists Dan Oakes, Andrew Clark and Chris Masters.
He has not entered any pleas.
The charges relate in part to an ABC investigation published in 2017 called "The Afghan Files: Defence leak exposes deadly secrets of Australia’s special forces".
The investigation was said to give an unprecedented insight into the clandestine operations of Australia’s special forces, including incidents of possible unlawful killings.
Speaking outside court, Mr McBride said he had admitted handing over the documents but would defend the charge on legal grounds.
"I saw something illegally being done by the government and I did something about it," he said.
"I'm seeking to have the case looking purely at whether the government broke the law and whether it was my duty as a lawyer to report that fact."
Mr McBride is charged with theft and three counts of breaching the Defence Act, for being a person who is a member of the the defence force and communicating a plan, document or information.
The charges, if prosecuted on indictment, attract an unlimited fine or imprisonment for any term as the maximum penalties.
If dealt with summarily the penalties are six months in prison or a small fine.
Mr McBride faces a further charge under old secrecy provisions in the federal Crimes Act, which make it an offence for a Commonwealth official to disclose information without authorisation.
That law has since been revoked and replaced in the Criminal Code, broadening its scope and increasing the penalties that apply in certain cases.
Mr McBride said he first sought an internal inquiry through defence and then went to police. When police did not act he went to the media.
Mr McBride said he gave the documents to the ABC, the Sydney Morning Herald and Chris Masters but only the ABC published a report.
The prosecution of Mr McBride will draw inevitable comparisons with that of the former Australian spy Witness K and his lawyer Bernard Collaery.
The pair are also being pursued by the Commonwealth Director of Public Prosecutions accused of revealing information about the Australian Secret Intelligence Service.
Witness K revealed an illegal bugging operation by the Australian government on East Timor during negotiations over an oil and gas treaty.
The pair face a maximum two years in jail if found guilty, a penalty since increased to 10 years. National security claims over the brief of evidence have delayed the defence access to it and the case's progress.
A preliminary hearing for that case will be heard in secret.
On Thursday, a Legal Aid lawyer for Mr McBride told the court some of the relevant material was classified and his office was having difficulty finding a lawyer with the necessary clearance.
The one option so far was the director of the service Dr John Boersig, the lawyer Hugh Jorgensen said.
Mr McBride said the government's claim of classified material was a smokescreen and there was no reason why the case shouldn't be held in the open.
Mr McBride said he had been living in Spain when he was arrested at the airport in Sydney on his way home in September last year.
Aware of the risk of arrest, he had returned home to attend a father daughter dance.
Mr McBride studied at Sydney University before going to Oxford. He then joined the British army, spending six years with the Blues and Royals, the Queen's household cavalry.
He also served with the SAS and did tours of duty in Northern Ireland and Afghanistan.
"I have a duty to look after Australia, if that means reporting illegal activity by the top brass of the ADF I'm going to do it, I'm not afraid of going to jail," he said.
"If I was afraid of going to jail, why would I have been a soldier?"
He is next due in court on May 13.
Sign up for our newsletter to stay up to date.