Home Affairs Minister Peter Dutton has effectively told the Australian Federal Police to avoid raiding or investigating journalists who have been leaked confidential information, in a rare intervention ahead of a major public inquiry into press freedom.

In a ministerial direction two months after high-profile raids on media outlets in Sydney and Canberra, Mr Dutton said he wanted the AFP to change its procedures to "take into account the importance of a free and open press in Australia's democratic society" before executing search warrants.

The direction applies to investigations where police may be trying to prosecute government staffers who have leaked secret information. Distributing classified information can be a crime, as can receiving and publishing it.

While Mr Dutton did not explicitly order the AFP to abandon investigations into News Corp reporter Annika Smethurst and ABC journalists Dan Oakes and Sam Clark, senior police may interpret his direction as proof that the trio would never be prosecuted and decide to abandon their probes.