“Nobody has demonstrated how those stories undermined national security,” says Peter Greste. “You could make the case that they improved it.”

The former Al Jazeera journalist, now professor at the University of Queensland, is referring to The Afghan Files – a series of articles published by ABC journalists Dan Oakes and Sam Clark in 2017, which levelled accusations that Australian troops committed war crimes while serving in Afghanistan. For their reporting, Oakes and Clark relied on secret documents allegedly leaked to them by military lawyer David McBride.

Greste has worked in Afghanistan. He knows of its effective bush telegraph, which he says would have communicated the ways Australia’s special forces were behaving. “That would have made Australians very vulnerable to retaliation,” he says. “We undermine national security by going outside the rules of war, and we improve it by keeping government accountable.”

In recent months, with his UQ colleague Richard Murray, Greste has been undertaking qualitative research with more than 20 senior investigative journalists, editors and newsroom lawyers, looking at their ability to perform their fourth-estate roles. He has observed the marked impact of national security legislation and the Australian Federal Police raids on News Corp and ABC journalists, including Oakes and Clark, on journalism in Australia.

Greste says provisional findings of the ongoing study suggest senior journalists’ sources are drying up as they find it increasingly difficult to protect their sources and to guarantee their sources’ anonymity. “The data retention legislation, the espionage legislation, the encryption legislation and now the raids – it’s all been very damaging,” says Greste.

Legal and media experts say recent directives by Attorney-General Christian Porter and Home Affairs Minister Peter Dutton are unlikely to warm the chilling effect that Australia’s unique and draconian national security laws and the AFP raids are having on public-interest journalism.

“The real targets of the June raids weren’t the journalists, though if journalists are prosecuted, that will have a chilling effect. But the real targets were the leaks themselves.”

It emerged this week that Porter instructed Commonwealth prosecutors on September 19 to seek his formal approval before charging any journalists with certain crimes. The news follows a directive Dutton issued to the AFP in August, telling it to “take into account the importance of a free and open press” before undertaking investigative action involving journalists.

The AFP began an investigation into The Afghan Files leak and, in September 2018, McBride was charged, unexpectedly, with theft; he has since been committed to stand trial on that and two other charges. The warrant executed by the AFP in June authorised the agency to search for evidence to build its case against McBride, but also against Oakes – for, the warrant said, “unlawfully obtaining military information” and for receiving stolen Commonwealth property.

Unlike the new secrecy laws introduced in 2018, the receiving charge does not allow a defence for journalists reporting in the public interest. But in June, Porter declared he would be “seriously disinclined” to authorise the prosecution of journalists for doing their jobs; that disinclination is reinforced by his September directive, which specifically nominates the two offences for which the AFP was considering prosecuting Oakes.

Former Media Watch host Jonathan Holmes, a member of ABC Alumni, which represents almost 300 former staff and other supporters of the national broadcaster, says the attorney-general’s decision is a positive one for the reporting team behind The Afghan Files.

“I would definitely be taking some comfort from [Porter’s directive] if I were Dan Oakes,” he says. “It’s absolutely gobsmacking that a journalist could conceivably be charged with receiving stolen property as the result of receiving leaked information.”

Oakes, Clark and News Corp’s Annika Smethurst – the other journalist raided in June – appear safe for as long as Porter, or whoever eventually succeeds him as attorney-general, refuses to authorise their prosecution.

But experts say the effects of these raids, and of the extraordinary stream of legislation being ushered through parliament, are much broader. “The real targets of the June raids weren’t the journalists,” suggests Dr Rebecca Ananian-Welsh, senior lecturer at UQ and an expert on national security legislation, “though if journalists are prosecuted, that will have a chilling effect. But the real targets were the leaks themselves.”

During a hearing in September, the ABC’s manager of editorial policy, Mark Maley, told the parliamentary joint committee on intelligence and security: “Anecdotally, there are reams of examples from within the ABC alone … of sources saying, ‘It’s just too dangerous’ … There are stories that are not being told, because whistleblowers are afraid. They’re afraid not just of losing their job, but of losing their liberty.” For talking to journalists without authorisation from their departments, government employees face maximum prison terms of 10 years – and even longer for some charges.

Maley told the committee he has also observed a “chilling effect” on investigative journalism in the past two to three years. “People feel as though they’re being surveilled and are at the risk of criminal sanctions; and having to defend criminal actions is genuinely chilling and distressing for people who see themselves as ordinary reporters and feel as though they’re doing good daily work,” he said.

Many experts now accept that much of the Howard-era national security legislation was arguably necessary to catch Australia up to other democracies. “We had no laws dealing with counterterrorism in 2001, compared with Britain, which had a long history,” says Professor George Williams, the dean of law at the University of New South Wales and a leading expert in constitutional law. “But we’re well past that now.”

Williams began counting the number of new security laws Australia’s parliament was making from 2002. His UNSW Law School colleague Dr Nicola McGarrity has continued the count. After a slower rate in 2007-2013, during the Rudd and Gillard governments, Dr McGarrity says an acceleration began when Islamic State declared its worldwide caliphate in mid-2014. “Australia has gotten a new piece of national security legislation, on average, about once every 13 weeks since then,” she says. The count is now at 82, with another five bills currently before parliament.

It has been a crime for Commonwealth employees to leak secret information to journalists since the first months of World War I in 1914. But as long as journalists protected their sources and whistleblowers were careful, government secrets could be divulged in the public interest without much fear that leakers would be identified. When public servant Desmond Kelly was charged with leaking a Howard government plan to clamp down on war veterans’ entitlements, Herald Sun journalists Michael Harvey and Gerard McManus famously refused to name their source at Kelly’s pre-trial hearing. They were convicted of contempt of court, but they kept their source’s confidence.

Protecting sources became much more difficult following the passage of data retention laws in 2015 – laws the Commonwealth Ombudsman later found were being almost routinely breached by police without consequence. New laws allowing agencies to get through encryption technologies – including by co-opting telcos, getting around passwords and installing spyware – were rushed through in the final sitting week of 2018. Six months earlier, laws broadening protections for government secrets and increasing penalties for whistleblowers were passed.

Since the AFP raids in June this year, Labor has suggested a conspiracy between the Morrison government and the federal police, which both deny. But there is a far more straightforward explanation for the raids – Labor voted for the laws that not only authorised them but probably required them. “It’s the job of the authorities to enforce these laws,” says George Williams. “It would be more surprising if they didn’t use them.”

Williams, who ran for Labor preselection in 2007 and 2010, says he is “not aware of Labor ever voting against one of these measures.

“Many have gone through parliament with lightning speed, often facilitated by the opposition declaring, upfront, that they will vote for legislation – sometimes even before seeing its detail.”

Bill Shorten repeatedly declared Labor was “in lockstep with the government on national security” during his time as opposition leader.

“There would be times when Labor would have liked to oppose some of these laws,” says Williams, “but felt politically unable to. The question is, where will this end?”

Imprisoned for more than a year in Egypt while he was working for Al Jazeera, Peter Greste – who is also a spokesperson for the Alliance for Journalists’ Freedom – knows about the consequences of an unfree press. “I’m not suggesting we’re about to become Egypt,” he says. “But the political imperatives [behind the Egyptian laws] are the same as those driving the national security legislation here.”

On The Afghan Files case, he is resolute. “We must accept those journalists were performing their duties in a democracy,” he says. “Any law that criminalises that kind of journalism is a flawed law, because that’s the kind of journalism our democracy needs.”