One of Australia’s allies threatened to stop sharing intelligence after top secret information was leaked to the media, the nation’s top cops have revealed while defending raids on journalists.

AFP Deputy Commissioner of Operations Neil Gaughan refused to name the country as he revealed the threat today at a parliamentary inquiry into press freedoms.

In his defence of the raids on News Corp journalist Annika Smethurst and the ABC’s Sydney headquarters in June, Mr Gaughan also warned that top secret information could be accessed more easily by foreign hackers if it was leaked and held on the computer networks of media organisations.

Outgoing AFP Commissioner Andrew Colvin defended the AFP’s “very judicious” use of its powers, saying it could have launched up to 75 investigations into journalists in the past five years but only conducted two raids.

Mr Colvin did not rule out charges being laid against Ms Smethurst over her 2018 report on plans to expand the powers of cyber intelligence agency, the Australian Signals Directorate, to monitor Australian citizens without their knowledge.

Spy agency ASIO and Home Affairs boss Michael Pezzullo will front the inquiry later this morning.

“One of the biggest concerns we have in relation to top secret and secret information being made in the public domain is it goes to the issue of reputation and trust that are held by our international partners, law enforcement and intelligence, about our ability to protect information,” Mr Gaughan said.

“My own personal experience is that around about 2014 we had a very similar situation whereby information was leaked and there was some threats made by a partner that if we didn’t actually get our act together, the information flow would cut off.

“That’s a pretty serious issue for us.”

Mr Gaughan said the AFP was aware of other classified information currently held by media organisations.

“The ability of their IT infrastructure to protect that information at the top secret level doesn’t exist,” he said.

Classified information was “extremely well protected” by intelligence agencies but the ability for foreign actors to access it on media computer networks was “quite high and is quite worrying,” he said.

Commissioner Colvin defended the AFP’s restraint in not investigating more journalists, saying the organisation understood the “magnitude” of “any interaction between police and a journalist”.

“Contrary to the perception this is not a decision that we take lightly. In fact, in the last five years alone the AFP has received 75 referrals for potential unauthorised disclosure offences.

“Each and every one of them could have resulted in evidence being sought from a journalist or a media organisation.

“However there have only been two occasions in that time when an investigation has led to that action taking place.”

He said the AFP was “very judicious” in the use of its powers and raids were only an option of “last resort” when police had hit a dead end with their investigation.

Media bosses yesterday warned the inquiry about the “creeping secrecy that shrouds Canberra” as they argued for more protections for whistleblowers and journalists.

“We may not be living in a police state, but we are living in a state of secrecy,” News Corp Australasia chairman Michael Miller said.

He argued that law reforms would not put journalists above the law, but would allow them to report on the public interest without fear of being jailed for doing their jobs.

“Doctor-patient and lawyer-client privilege is not above the law,” he said.

“Parliamentary privilege, available to politicians for the 20 weeks of the year that they’re in Canberra, is not above the law.”

The press freedom inquiry is due to report back to Parliament by October 17.