Australian police raided the headquarters of the Australian Broadcasting Corporation on June 5, amid a crackdown on sensitive leaks. (Saeed Khan/AFP/Getty Images)

John Lyons is the executive editor of ABC News and head of investigative journalism.

When the Australian Federal Police (AFP) raided the headquarters of the country’s national public broadcaster on June 5, it came loaded for bear.

Six agents from the federal police arrived at Australian Broadcasting Corporation’s headquarters in Sydney to execute one of the most extensive search warrants ever carried out in Australia. Disregarding ABC journalists’ commitments to protect the identities of their sources, the warrant gave the agents the power to take any relevant files and recordings, and even gave them power to delete or alter documents.

The AFP gave ABC’s IT experts keywords that they believed would capture any documents or notes that journalists had used in preparation of “The Afghan Files,” a story broadcast by ABC in 2017. Their keywords identified 9,214 documents, which the AFP claimed could be relevant in its pursuit of the source of the story about elite Australian soldiers committing possible human rights abuses in Afghanistan.

As the head of investigative journalism for ABC, I set out to shadow the agents; two of the journalists on their warrant report to me, so I wanted to know exactly where the police would go inside our building and what they would try to access.

A raid on the media in Australia is rare — at least until recently — and I wanted to keep the two reporters named on the warrant updated. So I began live-tweeting. One agent soon asked why I was doing it. I told him we were a media organization that told stories. He agreed — so history was made with the first live-tweeting from inside a high-profile Australian police raid.

For me, though, the raid was a depressing nine hours, a distressing low point for Australian journalism. It was a violation of the confidences we share with our colleagues and contacts when preparing stories.

I didn’t realize how much interest the event was gathering. Within hours, an additional 14,000 people from around the world had begun to follow this raid. And it helped fuel an instant outcry. Even ABC’s traditional rival, Rupert Murdoch’s News Corp., swung behind us.

Only 24 hours earlier, the Canberra home of News Corp. political reporter Annika Smethurst had been raided. The AFP went through her cookbooks, her bedroom, even her underwear. The same day, another prominent broadcaster, Ben Fordham from radio 2GB, was pressured by officials to reveal the source of a story about the turn-back of several refugee boats. He refused.

Suddenly, Australia has a war on the media. The center-right government led by Prime Minister Scott Morrison has been reelected — against predictions of the media and pollsters — and appears to be emboldened.

The AFP could have opted to serve subpoenas for the documents, but instead chose the two raids. In my view, the inevitable dramatic pictures were intended to intimidate journalists and potential whistleblowers.

Australia’s “protection” of whistleblowers is so weak as to be meaningless. Several are facing jail for assisting the media. One case involves “Witness K,” a former senior officer in the overseas spy agency, the Australian Secret Intelligence Service (ASIS). Witness K raised concerns about an operation after the agency allegedly bugged a meeting room of the East Timorese prime minister so Australia could gain an advantage in negotiations over the final drawing of the maritime boundary between Australia and East Timor. At stake were billions of dollars of oil and gas reserves straddling the boundary.

Going through the approved process for anyone with a grievance, Witness K contacted the inspector-general of intelligence and security, and reportedly raised his concerns both about the bugging and about whether his own career had suffered for raising inside ASIS his criticism of the operation.

Eventually the information about the bugging was leaked, allowing the Timorese to press for a maritime boundary accessing a greater extent of gas reserves.

But Witness K’s home was later raided, his passport confiscated, and he has been served a summons relating to breaching intelligence laws.

What has unnerved Australia’s lawyers is that the government is also now prosecuting Witness K’s lawyer, Bernard Collaery. For a year, Collaery and his team have not been able to see the prosecution’s complete brief of evidence to prepare for his defense.

Unlike in the United States, where the First Amendment reinforces the public’s right to know, Australia has no such protection. Successive Australian governments have sought to increase the powers of the national-security establishment with laws that make the work of journalists more difficult.

Currently, there is nominally some protection for whistleblowers but, at the federal level, this does not cover disclosures of intelligence or “sensitive” police information. And journalism has been criminalized to the extent that if a journalist even handles “secret” or “top secret information," they can be charged and jailed.

This has created the Orwellian power of the authorities to be able to charge a journalist should they be caught in a cafe merely holding such a document, or opening an email containing classified documents. And that, in turn, feeds a temptation for officials to stamp documents as “secret” or “top secret.”

Australia’s law needs to change to give genuine protection to journalists and whistleblowers as long as their exposures are in the public interest.

The largest umbrella group for barristers, the New South Wales Bar Association, noted that there was no full public interest defense in Australia. “Such a defense is necessary to protect the confidentiality of sources, which in turn enables proper reporting and robust debate regarding matters of public importance in a democratic society,” said the association’s president, Tim Game.

Unless there is law reform, the humiliation suffered by the Australian media in recent weeks will occur again. And Australia as a democracy will suffer.

Sign up for The Washington Post Press Freedom Partnership newsletter, a curated view of the latest issues affecting press freedom worldwide through updates from The Post’s press freedom partners, and sharp commentary and analysis from Post writers, delivered monthly.

Read more:

Emily Howie: Australia’s raids on journalists reflect a creeping surveillance state

Richard Glover: Can a politician take on Rupert Murdoch’s empire and win? Australia will be the test.

Henry Olsen: Australian conservatives are facing their own Trumpian uprising

Richard Glover: 10 key lessons from Australia’s poll-defying election results