The Federal Court has dismissed a legal bid by the ABC to block the Australian Federal Police from perusing documents they seized in a 2019 raid.
The ABC says a chilling Federal Court decision gives police the right to "enter a newsroom and fossick around for confidential files".
The public broadcaster has failed in its legal bid to block the Australian Federal Police poring over documents seized in a controversial raid last year.
ABC News director Gaven Morris says the decision is a blow to democracy.
"It's clear that the way public-interest journalism is able to be undertaken in this country is a mess," he told reporters outside the court in Sydney.
"I think fundamentally the court has ruled the AFP has the right to enter a newsroom and fossick around in confidential files.
"This should send a chill down all our citizens' spines."
Police raided the ABC's central Sydney offices last year following news reports in 2017 revealing Australian soldiers may have committed war crimes in Afghanistan.
Dubbed the Afghan Files, the stories were based on leaked Defence Department papers.
The broadcaster argued it was "legally unreasonable" for federal police to seek a warrant to search its head office and for a registrar to grant it.
The case was dismissed by Judge Wendy Abraham in Sydney on Monday morning, with the ABC also ordered to pay costs.
In her published judgment, she said the ABC had failed to prove the police search warrant was invalid.
"In the event I am wrong and had I decided otherwise, I would not have ordered the material seized be returned to the (ABC)," she wrote.
'Attempt to intimidate journalists'
ABC managing director David Anderson says the AFP raid was an attempt to intimidate journalists.
"This ruling highlights the serious problem with Australia's secrecy laws," he said in a statement.
"The ABC calls on the AFP to resolve this issue as a matter of urgency and drop its threat against our journalists."
The home of Herald Sun journalist Annika Smethurst was raided by federal police last year in relation to a 2018 story detailing a government proposal to spy on Australians.