As the 2005 provincial election was approaching, the 45 year old Horgan won the NDP nomination against Julie Thomas of Shawnigan Lake in the riding of Malahat-Juan de Fuca. The incumbent MLA Brian Kerr was not seeking re-election, so in the general election Horgan faced BC Liberal Cathy Basskin of Cowichan Bay, Democratic Reform BC party leader Tom Morino, Green Party candidate Steven Hurdle, and Western Canada Concept candidate Pattie O'Brien. Though Horgan won his riding, the NDP under Carole James's leadership formed the Official Opposition to the BC Liberals who formed a majority government.