Australia's High Court has ruled that a search warrant giving police permission to raid a journalist's home last year was invalid.
Federal police seized data from the phone and computer of News Corp reporter Annika Smethurst when they entered her home in Canberra last June.
The data was seized to help authorities identify the confidential sources behind her April 2018 story alleging the government wanted to expand the intelligence community's capabilities to spy on Australian citizens.
The seven-member High Court agreed unanimously in its ruling Wednesday that the warrant did not state the exact offense Smethurst allegedly committed, rendering it invalid. But the court did not determine whether police must return the data it seized from Smethurst.
In a statement, Australian Federal Police said it would act in accordance with the High Court.
After the ruling, Michael Miller, executive chair of News Corp. Australasia, said news outlets should be allowed to contest warrants before they are executed.
"The High Court ruling sends an indisputable message, that the Federal Police must obey the law and that their raid on Annika Smethurst's home was illegal," Miller said in a statement.
The day after the raid on Smethurst's home, federal police executed search warrants on the Sydney-based headquarters of public broadcaster Australian Broadcasting Corporation looking for the sources behind the network's report of alleged war crimes committed by Australian troops in Afghanistan.
The raids sparked anger by civil liberties groups and media organizations over the issue of freedom of the press.
The New York-based Committee to Protect Journalists said after the June raids that the action "directly threaten Australia's standing as a country that respects press freedom," and that reporters should be given "the legal protections they need to do their job."
Journalist groups and rights advocates welcomed parts of the Wednesday court ruling but noted that the decision was based on a technicality.
"The raid was an attack on the public's right to know what our governments do in our name," said Marcus Strom, federal president of the Media, Entertainment and Arts Alliance, which represents journalists.
"The warrant has been quashed on a technicality, but the powers that enabled the raid remain," he added in a statement.
Peter Greste, an Australian journalist who has become a press freedom advocate after being imprisoned in Egypt, said in a tweet that the High Court had given "a technical ruling that said the [federal police] messed up writing the search warrant."
"The court did not address press freedom issues. The judgment underscores once again the need for robust protection for press freedom in Australian law," Greste's tweet said.
Some information in the report is from Reuters and AP.