OTTAWA—Michael Wernick—the country’s top bureaucrat—is leaving his job, telling Prime Minister Justin Trudeau that recent events have made it clear it would be impossible for him to maintain a “relationship of mutual trust'' with the opposition parties.

Canada's Privy Council Clerk Michael Wernick arrives to testify before the House of Commons justice committee on Parliament Hill on March 6, 2019. Dave Chan/Getty Images