In a major shakeup to the highest ranks of the Prime Minister's Office, Gerald Butts resigned Monday as Justin Trudeau's principal secretary.

The bombshell departure — Butts, along with chief of staff Katie Telford, are the two most senior staffers in Trudeau's inner circle — comes amid allegations that senior members of the PMO pressured former justice minister Jody Wilson-Raybould to help Quebec-based multinational engineering firm SNC-Lavalin avoid criminal prosecution on bribery and fraud charges in relation to contracts in Libya.

In a statement to reporters, Butts said he categorically denies allegations that he or anyone else in the PMO put this sort of pressure on Wilson-Raybould. He said the accusation is "simply not true."

"At all times, I and those around me acted with integrity and a singular focus on the best interests of all Canadians," Butts said Monday.

"Canadians are rightly proud of their public institutions. They should be, because they work. But the fact is that this accusation exists. It cannot and should not take one moment away from the vital work the prime minister and his office is doing for all Canadians.

"My reputation is my responsibility and that is for me to defend. It is in the best interests of the office and its important work for me to step away," he said.

It was not immediately clear who would replace Butts.

Wilson-Raybould announced last week she was quitting the Liberal cabinet just days after a Globe and Mail report claimed she was pressured to direct the Public Prosecution Service of Canada to sign a deferred prosecution agreement (DPA) — a legal tool resembling a plea deal — with SNC-Lavalin.

The prime minister has denied any wrongdoing.

The House of Commons justice committee has agreed to study the matter. Opposition members of that body have insisted that Butts should be among the witnesses called to testify about what exactly went on inside the PMO on the SNC-Lavalin matter. Last week, Liberal members defeated an NDP motion that would have compelled Butts and Wilson-Raybould to appear.

Wilson-Raybould has taken the highly unusual step of retaining Thomas Cromwell, a recently retired Supreme Court justice, as her legal counsel as the scandal enters a new phase.

In a tweet, Trudeau said Butts served Canada with "integrity, sage advice and devotion." He thanked the former staffer for his service and "continued friendship."

Move raises 'even more questions,' Scheer says

Conservative Leader Andrew Scheer said the Butts resignation is the "clearest indication yet that there is much more to the SNC-Lavalin affair than the prime minister has so far admitted."

Rather than wipe the slate clean, Scheer said Butts' departure "does not in any way settle this matter. In fact, it presents even more questions that must be answered."

Scheer said the staff changeover is sign the prime minister is "desperate to keep the truth hidden."

The Tory leader renewed his call for Trudeau to waive solicitor-client privilege and let his former justice minister speak freely about what is said to have transpired.

Trudeau loses long-time political ally

In addition to the political partnership, the prime minister is close friends with Butts — a relationship that dates back to their time as students at McGill University in Montreal where they were members of the campus debating club.

Born in Glace Bay, N.S., a coal-mining town on Cape Breton Island, Butts worked on public policy in Ontario before becoming a senior staffer under former Liberal premier Dalton McGuinty at Queen's Park.

While in provincial politics, Butts crafted policies designed to bolster the party's progressive credentials. Among the actions, the government phased out coal-fired power plants, implemented full-day kindergarten and increased Ontario's minimum wage.

After working as a campaigner at the World Wildlife Fund, Butts then made the leap to federal politics and helped chart Trudeau's political future as leader of the Liberal Party and later prime minister.

The prime minister thanked Butts and Telford by name after clinching power in the 2015 federal election.

"Katie and Gerry are two of the smartest, toughest, hardest-working people you will find anywhere," Trudeau said at his Montreal-area victory party on the night the Liberals captured a majority government.

"They share with me the conviction that politics doesn't have to be negative and personal to be successful."

Trudeau chats with Butts after the Liberal leadership debate in Mississauga, Ont., on Feb. 16, 2013. (Chris Young/Canadian Press)

Praised by his allies as a brilliant mind, and vilified by Liberal foes as the political puppet master behind the prime minister, Butts said Monday he is proud of his time as Trudeau's right-hand man.

"While it is fashionable sometimes in some quarters to denigrate politicians and public servants, my experience is that the women and men who serve Canadians in elected office and the professional public service are honest, decent, hard-working people who put service of country beyond self every day," he said.

A well-known policy wonk, Butts has been a vocal defender of the government's Canada Child Benefit and an advocate for carbon pricing as a solution to climate change.

He was also intimately involved in the NAFTA renegotiation efforts — working closely with U.S. President Donald Trump's son-in-law, Jared Kushner, in particular — that produced a new tripartite trade agreement last fall.

In his resignation letter, Butts said he hoped fighting global warming "becomes the collective, non-partisan, urgent effort that science clearly says is required. I hope that happens soon."

Butts' past comments on the energy industry — said before he made the leap to Trudeau's political team — have provoked the ire of oilpatch boosters.