Video caption Wilson-Raybould says she felt political pressure and "veiled threats" from government officials

A Canadian ethics commissioner has said that Prime Minister Justin Trudeau violated federal conflict of interest rules in the handling of the SNC-Lavalin affair. Here's what you need to know about the political crisis and the latest developments.

In a nutshell

Earlier this year, Mr Trudeau was accused of pressuring his former attorney general to cut a deal with a company facing corruption charges - and retaliating when she refused to play ball.

The former AG, Jody Wilson-Raybould, said Mr Trudeau and his staff spent months trying to convince her that taking the company to trial would cost Canadians jobs, and their party votes.

She also said she was subject to "veiled threats", which she believes were made good when she was shuffled out of her department.

Another minister, Jane Philpott, also quit, saying it was "untenable" for her to continue due to "serious concerns" raised by the case.

But Gerald Butts, Mr Trudeau's former principal secretary, says there was no political pressure - only concerns for how the prosecution could affect local economies.

Image copyright Reuters Image caption Jody Wilson-Raybould, former Canadian justice minister, speaks about the SNC-Lavalin affair

In August, the independent federal ethics commissioner released the report of his investigation of the matter, saying that Mr Trudeau violated the conflict of interest act.

Commissioner Mario Dion said that the prime minister, directly and through his senior officials, used various means to exert influence over Ms Wilson‑Raybould.

Who are the players?

The ex-minister: Jody Wilson-Raybould was Canada's attorney general and justice minister. Unlike in the UK, the two roles are held by the same person.

She was also Canada's first indigenous justice minister and worked on a number of pieces of landmark legislation, including legalising cannabis and assisted dying.

In January, she was shuffled from the justice department to the department of veterans' affairs - a move many saw as a demotion.

She was later expelled from the Liberal caucus and is running for re-election as an independent candidate.

The corporation: SNC-Lavalin is one of the world's largest engineering and construction companies.

The company faces 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 and 2011, when Muammar Gaddafi was in power.

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.

The PM: Justin Trudeau is Canada's prime minister. He won a majority government in 2015 on a platform of transparency, gender equality and a commitment to reconciliation with Canada's indigenous peoples.

He faces a federal election in October 2019.

The Trudeau ally who quit: Jane Philpott is described as one of his most trusted ministers.

But her resignation statement explaining why she was quitting as Treasury Board president could not have been more pointed.

Citing the SNC-Lavallin affair, she said: "I must abide by my core values, my ethical responsibilities, constitutional obligations. There can be a cost to acting on one's principles, but there is a bigger cost to abandoning them."

She was later expelled from the Liberal caucus along with Ms Wilson-Raybould and is running for re-election as an independent candidate.

Trudeau's right-hand man: Gerald Butts has been described as the "most important Liberal in Canada today" whose last name is not "Trudeau". But all that changed in February, when Mr Butts resigned amid rumours he had pressured the justice minister to cut a deal with SNC-Lavalin.

Mr Butts is one of Mr Trudeau's closest allies, and the two have been friends since their university days in Montreal.

He is credited with helping Mr Trudeau win the Liberal party leadership in 2013 and was a key architect in the Liberal party's sweeping 2015 electoral victory.

Image copyright Reuters Image caption Jody Wilson-Raybould, seen here with Prime Minister Justin Trudeau, has so far declined to comment

Why would Trudeau care about SNC-Lavalin?

SNC-Lavalin is based in Quebec, a swing province that has long been viewed as essential ground for the Liberal Party to win during an election - which is coming up in October.

When the Liberals win Quebec, they often win a majority of seats in parliament.

At the time that Wilson-Raybould says she was being pressured to cut a deal, Quebec was also in the middle of a heated provincial election that eventually led to the ousting of Quebec Liberal premier Philippe Couillard.

Wilson-Raybould says the federal Liberal Party kept raising the Quebec election as one of the reasons why she should consider cutting a deal with SNC-Lavalin.

A conviction for SNC-Lavalin at trial could also result in a decade-long ban on bidding on Canadian federal contracts and would allow authorities to cancel the company's current such contracts.

What does Trudeau say?

Trudeau had previously denied wrongdoing and says any lobbying by him or his inner circle for engineering giant SNC-Lavalin was done to protect jobs.

Following the release of the ethics commissioner's report, he said that he took responsibility but disagreed with some of its conclusions.

On how the SNC-Lavalin affair was handled, he said "we recognise the way this happened shouldn't have happened" but maintained his government was acting in national economic interests.

What could the fallout be?

The crisis has already proved to be politically costly for Mr Trudeau.

In February and March, it led to the resignation of two high-profile cabinet ministers, his top personal aide and the head of the federal bureaucracy - and it cast a shadow over his leadership.

But as the matter died down over the ensuing months, his polling numbers seemed to recover.

Now the scathing report has brought the SNC-Lavalin back into the news 10 weeks before Canadian voters head to the polls.