A former military lawyer had a higher duty to disclose alleged war crimes than keep classified information secret, a court has heard.
David McBride was an Australian Defence Force lawyer who served in Afghanistan.
He faces five charges of stealing and unlawfully disclosing to journalists military secrets about alleged misconduct by special forces troops.
In the ACT Supreme Court on Monday, a preliminary hearing focused on what evidence would be considered during his trial.
Commonwealth prosecutor Trish McDonald SC outlined the duties members of the defence force had to protect classified information.
"This necessarily implies an element of a duty not to disclose," she said.
She said McBride's disclosures were spurred by "recklessness".
Stephen Odgers SC, acting for McBride, disagreed.
Mr Odgers said the Defence Act allowed for lawyers to maintain rights afforded to legal practitioners when joining the force.
He said McBride's obligation as a lawyer was to disclose information that could lead to a serious criminal offence, which trumped any other duty.
He also argued McBride was duty bound to abide by the army's ethos and values, which included putting an end to inappropriate conduct.
This meant included taking decisive action against what he thought was serious offending by senior members of the defence force.
Mr Odgers also referred to the oath that defence personnel swore.
He argued this meant orders may need to be disobeyed to truly serve the sovereign by advancing the public interest, defined as the community's welfare.
"The oath is to serve the King, there's no reference to obeying orders," he said.
Ms McDonald contended the oath McBride swore didn't permit him to act against laws governing the defence force just because "the member believes doing so will advance the public interest".
The hearing continues and a jury is expected to convene later this week.
More than 100 supporters rallied outside the court before the hearing, calling for an end to the prosecution.
"Today I serve my country", McBride told the crowd as he approached the court with a raised fist in defiance and his support dog Jake by his side.
Advocates called for the attorney-general to use his powers to intervene and drop the prosecution.
Attorney-General Mark Dreyfus said he wouldn't comment on a case before the court.
"Of all matters that ministers should not comment on, it's criminal jury trials - that's what this trial is," he said.
A spokesman for his office earlier said the power to discontinue proceedings was "reserved for very unusual and exceptional circumstances".
Former senator and whistleblower advocate Rex Patrick said that was a selective interpretation.
"That is not what the law says, the parliament has granted him that power to deal with prosecutions that are not in the public interest," he told the rally.
In the Senate, a Greens motion calling on Mr Dreyfus to end the prosecution was defeated.