Australia's national broadcaster has lost a legal challenge to a highly publicized police raid that happened at its Sydney headquarters last year. The raid was linked to investigative reports on leaked secret government documents related to the Afghan war.

A federal court judge ruled on Monday the warrant used by police to raid the ABC headquarters last June was legal, ordering the ABC to pay the defense's legal costs.

Justice Wendy Abraham wrote in her judgment the ABC had "not established that the decisions to apply for and issue the warrant were legally unreasonable."

The ABC had claimed the search warrant used by police was invalid and therefore, the seizure of 124 documents was unlawful.

ABC director of news Gaven Morris said outside the court that the outcome was "really disappointing," and called for "urgent law reform."

He added, "Australia's access to a right to know what's going on is nowhere near the standard it should be, so it's time for some reform, it's time to recognize that we have a right to know what goes on inside our democracy."

The documents were the basis of a series of stories called the "Afghan Files", regarding alleged misconduct by Australian Special Forces in Afghanistan.

An ABC spokesperson said the broadcaster was considering further legal options in the matter.