This week’s police raids on media organisations have sparked outrage in Australia. But concern should be felt much further afield. With media freedom under growing pressure worldwide, they are a reminder that in liberal democracies as well as dictatorships the work of journalists, in the public’s service, can be imperilled.

On Tuesday, Australian federal police searched the home of a News Corp political editor who had reported that the nation’s surveillance agency was seeking to broaden its powers to spy on Australian citizens without their knowledge. Just a day later, they raided the national broadcaster ABC over stories on the clandestine operations of special forces in Afghanistan – including incidents of troops killing unarmed men and children.

Both actions relate to stories that appeared well over a year ago. They are of clear public interest. They both relate to allegations of publishing classified material, contrary to the Crime Act. Police say that such publication could “undermine Australia’s national security”.

As the novelist Richard Flanagan wrote in the Guardian, “It does seem extraordinary that two cases, each of long standing, would immediately after an election, suddenly be activated to this level of public attention without ministerial knowledge,” though the home affairs minister, Peter Dutton, has said he learned of the raids when they happened. All this comes amid growing concern in Australia that legal changes are whittling away media freedom.

To inform the people of what the government is doing in their name is not just a privilege of journalists but their duty. The national interest is not threatened by the embarrassment of authorities and institutions. What it cannot survive is the erosion of accountability. Raids like this week’s inevitably have a chilling effect, not only on reporters, but also on potential whistleblowers.

When we think of threats to media freedom it is natural to think of the countries where journalists are sacked, attacked or even killed for challenging authorities. Yet a Freedom House report this week warned that some of the world’s most influential democracies have seen concerted if more subtle attempts to throttle the independence of the media, by means ranging from ownership changes and public denunciations through to preferential access to information for friendly outlets. Such measures are damaging not only the quality of the media but the state of democracy itself.

The report also notes that Donald Trump’s attacks on the US domestic press have made journalists overseas more vulnerable; they have little reason to expect aid from Washington if their rights are violated. The broader message is that other countries take their cues from what powerful international players do. Police raids on media organisations raising matters of serious and legitimate public interest should never be regarded as normal.