Image copyright Reuters Image caption Former senior aide Gerald Butts says there was no inappropriate pressure in SNC-Lavalin case

Two members of Canadian PM Justin Trudeau's inner circle have denied wrongdoing in a corruption trial.

Former principal secretary Gerald Butts and the country's top public servant, Michael Wernick, were speaking to a House of Commons panel.

They denied pressuring former attorney general Jody Wilson-Raybould to go easy on a firm facing a criminal trial.

Fallout from the SNC-Lavalin affair has cost the prime minister two top ministers in the past few weeks.

Wednesday's testimony squarely pits Ms Wilson-Raybould's version of events against the prime minister's office.

What did Wilson-Raybould say?

Former attorney general and justice minister Ms Wilson-Raybould said last week that she had faced attempts at interference and "veiled threats" from the prime minister and members of his inner circle over a corruption trial facing Quebec-based engineering giant SNC-Lavalin.

She said she was subjected to repeated pressure over four months late last year to "find a solution" for the firm, and that she was warned about the impact a trial could have on an upcoming Quebec election.

Image copyright Reuters Image caption Former justice minister Jody Wilson-Raybould says she was pressured by the prime minister

In Canada, the attorney general is supposed to exercise independent prosecutorial discretion, without any political interference.

She directly accused Mr Butts of meddling with her role. She said Mr Butts told her chief of staff: "There is no solution here that doesn't involve some interference".

She also accused Mr Wernick, who is Privy Council Clerk, of threatening her. She said he told her the PM would "find a way to get it done one way or another".

What did Trudeau's closest ally say?

Mr Butts - one of Mr Trudeau's oldest friends - had a very different description of the conversations the prime minister and various officials had with Ms Wilson-Raybould with regards to the firm's prosecution.

Speaking on Wednesday for the first time before a House of Commons Justice Committee, Mr Butts said: "People can come away from the same experience with different impressions."

He quit as Mr Trudeau's principal private secretary in mid-February.

He said he only had brief and cordial discussions with the former minister with regards to SNC-Lavalin, and that the conversations were about the economic implications of the trial.

Mr Butts said the fact that a trial could put thousands of jobs at risk made the matter a "very real public policy problem" for the government.

Mr Butts said that it was always understood that any final decision on whether to offer SNC-Lavalin a deferred prosecution agreement was for the attorney general alone to make.

What else did he deny?

Mr Butts flatly denied telling her chief of staff "there is no solution here that doesn't involve some interference".

He said Ms Wilson-Raybould's removal as justice minister and attorney general in a cabinet shuffle in January had nothing to do with her refusal to budge on SNC-Lavalin.

He said there were many "complex considerations" made in a shuffle and that "SNC-Lavalin was not one of them". She was eventually moved to the veterans affairs portfolio before resigning.

Ms Wilson-Raybould had also accused Mr Wernick of making "veiled threats" if she did not defer the prosecution.

In his second appearance before the committee, Mr Wernick denied the accusation: "I made no threats to the attorney general, period."

But when pressed on whether he said things to her like "[Mr Trudeau] will find a way to get it done one way or another", Mr Wernick said he could not recall.

Media playback is unsupported on your device Media caption The testimony of Jody Wilson-Raybould v Gerald Butts

"I wasn't wearing a wire," he said by way of explanation.

He was defensive about accusations he behaved in a partisan way, and said he has become the victim of cyberbullying online.

"I am disappointed to be accused of partisanship by people who have never met me. My career is on the public record," he told the committee.

He said his conversations with her were in the public interest, and that he was just asking her to look into new evidence.

"The minister experienced lawful advocacy to consider doing something lawful in the public interest," Mr Wernick said.

What is the reaction?

Both opposition parties have called on Ms Wilson-Raybould to respond to Mr Wernick and Mr Butts' contradictory testimony.

Ms Wilson-Raybould said she is open to appearing again before the committee.

It is unclear if this will happen. A motion to have her testify a second time failed to pass the Liberal-majority committee.

What is happening with SNC Lavalin?

The Quebec-based firm is one of the world's largest engineering and construction companies.

The company and two of its subsidiaries face fraud and corruption charges in relation to approximately C$48m ($36m; £28m) in bribes it is alleged to have offered to Libyan officials between 2001-11.

The firm has openly lobbied to be allowed to enter into a remediation agreement instead of going to trial, saying it has cleaned house and changed its ways.

But the matter is proceeding to trial and the company says it will "vigorously defend itself" against the allegations.