OTTAWA – Canada's most senior bureaucrat, Clerk of the Privy Council Michael Wernick, has announced his "upcoming retirement," prompting Trudeau to name a replacement that will take the helm of the federal public service before the next federal election.

In an open letter to the prime minister published on the Government of Canada website, Wernick said that "recent events have led me to conclude that I cannot serve as Clerk of the Privy Council and Secretary to Cabinet during the upcoming election campaign," and that he intends to retire before the election is called.

Wernick said that there "is no path for me to have a relationship of mutual trust and respect with the leaders of the Opposition parties," after both the Conservatives and New Democrats have called for his resignation given his role in the still unfolding SNC-Lavalin controversy.

He was directly named by Jody Wilson-Raybould as one of the senior officials who she alleges was involved in a "sustained effort" to politically interfere in the criminal prosecution of SNC-Lavalin. She accused Wernick of issuing "veiled threats" if she did not change her mind about instructing federal prosecutors to pursue a remediation agreement rather than continuing with the criminal trial.

During his two appearances before the House Justice Committee on this matter, Wernick delivered direct and sometimes terse responses to MPs' questions about his alleged involvement. He denied ever making any threats in relation to Wilson-Raybould’s handling of the criminal case against the Quebec company, as she had alleged.

"The minister experienced lawful advocacy to consider doing something lawful in the public interest. I made no threats, veiled or otherwise, that the minister’s decision would lead to consequences for her…It is my contention the minister was doing her job and I was doing mine," Wernick testified earlier this month.

He also raised eyebrows during his first round of testimony when he offered off-topic opening remarks on the state of online discourse, partisanship and the prospect of political assassinations in the upcoming campaign.

In addition to concerns over his behaviour and perceived partisan comments as part of the SNC-Lavalin affair, MPs have also registered their discomfort with a related role he held: being part of a high-level panel responsible for deciding when and how to inform Canadians about concerning online behaviour during an election campaign.

NDP MP and ethics critic Charlie Angus sent an open letter to Prime Minister Justin Trudeau prior to Wernick’s second round of testimony, saying that Wernick was "deeply compromised," has "overstepped his role," and could not remain in his position. As of last week, the PMO had confirmed to CTV News that Wernick still had the confidence of the PM.

"It is essential that during the writ period the Clerk be seen by all political parties as an impartial arbiter of whether serious foreign interference has occurred," Wernick said in his letter. "It is essential that Canadians continue to see their world leading public service as non-partisan and there to provide excellent services to Canadians and the governments they elect."

The precise timing of his departure is unclear, with Wernick saying it is something he and Trudeau "should discuss."

Trudeau announced Monday that he intends to appoint current deputy minister of foreign affairs Ian Shugart as Wernick's replacement, "in the coming weeks."

Democratic Institutions Minister Karina Gould told reporters that the makeup of the panel — the Clerk of the Privy Council, Canada’s National Security Adviser, and the deputy ministers of the justice, public safety, and global affairs departments — will not change.

"When it comes to our elections, safeguarding them, protecting them from foreign interference is of top priority… this will continue to guide those individuals should they have to inform Canadians of foreign interference," Gould said.

Minutes after announcing the major shakeup to the leadership of the public service, Trudeau thanked Wernick for his service.

Wernick has been a public servant under both Liberal and Conservative governments over the last three decades.

"We've accomplished a lot as a government over these past three and a half years and it was definitely in large part because of the extraordinary public service and Michael Wernick's leadership within that. "He will be missed," Trudeau told reporters in the House of Commons foyer.

Opposition MPs seized on the latest development in what has become a string of high-profile resignations in the aftermath of the initial report of alleged PMO pressure, published in The Globe and Mail.

"Now we have an attorney general who has resigned, a Treasury Board president who has resigned, a top adviser to the prime minister who has resigned, and now the head of the public service itself has stepped down… the only person left to resign now is Justin Trudeau himself," said Conservative MP Pierre Poilievre.

NDP Leader Jagmeet Singh, who was celebrating his first day in the House as an MP, said that more than ever, a public inquiry is needed into the SNC-Lavalin case.