On Wednesday, the ABC decided to drop its public interest defence against a Federal Court lawsuit by former-special forces major Heston Russell.
The national broadcaster said it would rather abandon the defence than be required to name a confidential source, referred to as Josh, who said he saw Australian soldiers execute a hogtied prisoner in Afghanistan.
During a hearing on Friday, Justice Michael Lee permitted the ABC to reinstate its defence after hearing that Mr Russell and his lawyers had likely uncovered the identity of the source through online searches.
The judge questioned why the ABC had even dropped the defence in the first place before sending out a "self-congratulatory" press release regarding the development.
"We wanted the opportunity to defend our journalism in court, however a greater principle is now at stake – our ethical responsibility to honour the promise protecting the name of our source," ABC news director Justin Stevens said on Tuesday.
Mr Russell's barrister Sue Chrysanthou SC said it was "illogical" and "absurd" that the defence had been dropped to protect Josh's identity, arguing that the defence had been hopeless even back in October last year when it was filed.
ABC journalist Mark Willacy who spoke with Josh and agreed to keep his identity confidential will give evidence at a trial starting on July 28.
On Friday, ABC barrister Nicholas Owens SC cautioned Mr Russell and his legal team about grilling Willacy over Josh's details.
"There is going to be a problem if that question is asked of Mr Willacy," he said.
The journalist would not be breaking his promise and Mr Russell risked an emergency appeal which could derail the trial if he pressed this issue, the court heard.
Justice Lee will deliver his judgment on why the defence is reinstated later on Friday afternoon.
Lifeline 13 11 14
Open Arms 1800 011 046