Former Nationals leader Barnaby Joyce says politicians should be investigated for leaking classified information.

Two media outlets were raided last week after publishing stories based on leaked national security documents.

The Australian Federal Police raids have sparked a political debate over the freedom of the press.

But the AFP has also faced scrutiny after dropping an investigation into a third national security leak that benefited the federal government.

“If any politician – if anybody – is delivering documents that were for Australian eyes only then they should be held to extent of the law,” Mr Joyce told the Seven Network on Monday.

“They (the public) don’t like the idea that documents end up in the public sphere, someone has done it, and they’ve got to be held to account.

“If you’re going to have laws, you’ve got to comply with them, and nobody is exempt.”

The AFP last week raided ABC’s Sydney headquarters and the Canberra home of News Corp journalist Annika Smethurst.

The ABC was raided over stories in 2017 about allegations Australian soldiers may have carried out unlawful killings in Afghanistan, based on leaked Defence papers.

The warrant executed on Ms Smethurst’s home was over the 2018 publication of a leaked plan to allow the Australian Signals Directorate to spy on Australians.

The AFP’s twin raids preceded it abandoning an investigation into the leaking of a classified briefing about the so-called medevac bill, which changed the rules around asylum seeker medical transfers.

The ABC is preparing to launch legal action over the AFP raid.

Labor leader Anthony Albanese says his party will examine a breadth of suggestions for protecting press freedom, but has stressed he is limited in how he can grapple with the issue from opposition.

Centre Alliance Senator Rex Patrick is pushing for Australia to protect freedom of expression, including press freedom, in its constitution.

He argues the step, which would require a referendum, is necessary to deal with inconsistencies between existing laws.