He advocated for refugee rights, most prominently in the drawn-out case of Ahmed Zaoui, an Algerian asylum seeker initially deemed by the New Zealand government to be a security risk, but later allowed to settle in New Zealand with his family. During his time in Parliament Locke was a leading critic of New Zealand's anti-terrorist legislation, such as the Terrorism Suppression Act 2002, which he argued breached human rights principles. He also opposed New Zealand's commitment of special forces to the war in Afghanistan.