A former military lawyer turned whistleblower who leaked secret information about alleged war crimes should not be required to blindly follow orders, a Supreme Court judge has heard.
David McBride faces several charges relating to the theft and disclosure of classified documents to journalists, which detailed alleged misconduct by Australian troops in Afghanistan.
McBride is due to face a jury later this week.
During a pretrial argument on Tuesday, his barrister Stephen Odgers SC said blindly following orders, including those to keep classified documents secrets, ignored a precedent set after World War II.
The Nuremberg trial held prominent Nazis accountable for their crimes.
The war crimes tribunal rejected the argument German officers could be freed from consequences because they were only following orders.
Mr Odgers said for a defence member to "well and truly" serve the sovereign and fulfil their oath, there would be circumstances in which disobedience was needed for the greater good.
He gave the example of a navy captain ordering a communications officer not to tell another ship in peacetime they were headed for collision.
The officer would be punished for not following orders if he informed the other ship despite a crash being avoided.
But commonwealth prosecutor Trish McDonald dismissed the argument officers could disobey orders for something "as nebulous as the public interest".
She said following orders was "what it meant to be a soldier".
"Nowhere in the oath does it refer to the public interest or say members of the defence force need to act in the public interest," she said.
Ms McDonald argued McBride was not acting in the public interest when giving classified documents to journalists, but rather he was trying to "enlist them to try and have defence force troops investigated less".
McBride's original reason for leaking the classified material was not to have war crimes investigated, but rather that they were investigated too much, she said.
She quoted his record of interview, where McBride said what some journalists published from the documents was "the opposite of what I believed".
This meant he acted outside his duty as a lawyer for the Commonwealth to keep client information classified, Ms McDonald said.
Justice David Mossop is presiding over the case and will deliver his decision regarding McBride's duty on Wednesday.
Attorney-General Mark Dreyfus has faced pressure from human rights advocates to drop the prosecution.
But Mr Dreyfus said an intervention - which has only been done once in 120 years - would set a dangerous precedent for political interference and undermine the independence of the public prosecutor.