In the context of secrecy laws, a public interest defense is one which allows a defendant who disclosed classified or protected information to avoid criminality, if he can establish that the public interest in disclosure of the information outweighs the public interest in non-disclosure. This is aimed at protecting whistleblowers of Government misconducts.

The inclusion of the defense has been a subject of debate in the legislative process of the Official Secrets Act 1989 of the United Kingdom. The defense was finally not included in the Official Secrets Act. The defense was also absent in secrecy laws in other countries based on the Act.

Canada has reformed its secrecy laws in 2001, adding the defense in its Security of Information Act. However, its application is limited to situations where the defendant has followed a series of steps set out in the legislation before making the disclosure, and where the person's purpose in making the disclosure is to reveal an offence committed by another person in his official duties.

The inclusion of the defense has been a subject of debate in Hong Kong in 2003 during its legislative process to implement Article 23 of the Basic Law.

See also: Media in Hong Kong

External links