W HEN JUSTIN TRUDEAU formed his first cabinet after winning an election in 2015, it was a triumphant affair. The prime-minister-elect marched to Rideau Hall, home to the Queen’s representative in Canada, like a conquering hero, surrounded by beaming ministers. On March 18th, half a political lifetime later, he walked to the hall with just his security detail to make the third change to his cabinet this year. The usually media-friendly Mr Trudeau did not stop. Waiting reporters thought they heard him mutter “Having a good day....” as he slipped in by a side door.

There have not been many good days for the prime minister since the publication in February of allegations that he and his officials put pressure on the then attorney-general to fine rather than prosecute SNC -Lavalin, a large construction firm in Quebec accused of bribery. In their wake has come a slew of resignations. Jody Wilson-Raybould, the former attorney-general, left the cabinet on February 12th, followed by Jane Philpott, a respected minister who later quit in sympathy. Gerry Butts, Mr Trudeau’s senior adviser, took responsibility for “a communication breakdown” and resigned. This week Michael Wernick, Canada’s highest-ranking civil servant, told Mr Trudeau he too would go, since he is no longer trusted by the opposition.

It has been quite a comedown for the Liberal leader, whose pre-election promises of openness and transparency are being thrown back in his face by Conservative opponents scenting victory in a federal election due on October 21st. But it is too soon to count Mr Trudeau out.

The case against him and his officials is that they attempted to obstruct justice by urging Ms Wilson-Raybould to offer SNC -Lavalin a deal under which the company would pay a fine and agree to mend its ways in order to avoid a trial. She told the parliamentary justice committee, which has been investigating the case, that she did indeed feel pressure. But she added that the harassment, though inappropriate, was not illegal. (The attorney-general, who is a member of the cabinet, is not supposed to be influenced by political considerations.) Mr Trudeau admits he raised concerns about job losses but did not direct Ms Wilson-Raybould to change her decision. The case is still going to trial.

The details may be murky but, says Darrell Bricker of Ipsos, a polling firm, voters smell a rat. An average of recent polls shows the Liberals behind the Conservatives, by 33% to 35%. Sensing they are on to a winner, the Conservatives have been demanding that Ms Wilson-Raybould come back to parliament to testify again. (That hope died on March 19th when the Liberals used their majority to end the committee’s investigation.) The Conservative #LetHerSpeak campaign on social media targets another of Mr Trudeau’s soft spots. After championing the rights of women and indigenous peoples, he now finds himself at daggers drawn with Ms Wilson-Raybould, who is both female and a member of the We Wai Kai nation.

But the Conservative opposition is not benefiting as much as might be expected. It has its own vulnerabilities. The party has tacked rightward under its leader, Andrew Scheer, after a dissident member, Maxime Bernier, set up a new party even further to the right. Before the SNC -Lavalin scandal, the Conservatives had been hammering the government for letting too many asylum-seekers cross the border with the United States. But Mr Scheer is finding it hard to appeal to anti-immigrant supporters without offending the large majority of Canadians who back immigration. He got into trouble last month for sharing a platform with Faith Goldy, a controversial white nationalist.

Economic issues tend to be more important in Canadian elections than political controversies. Here, Mr Trudeau’s record is mixed. Unemployment is close to a 40-year low. Workforce participation is rising for women, young people and immigrants. The introduction of an income-tested child benefit in 2016 has lifted almost 300,000 children out of poverty. But growth seems to have ground to a halt ( GDP rose by a miserable 0.4% at an annualised rate in the last quarter of 2018) and household debt is at a record high.

The budget on March 19th was the government’s last chance before the election to offer voters some goodies—and persuade them that it knows what it is doing. It duly took the first step towards a national “pharmacare” plan (to make prescription drugs cheaper), offered first-time owners a new incentive to buy a house, increased money for municipal infrastructure, lowered interest rates on student loans and so on. Thanks to an unexpected increase in tax revenues, the government still was able to keep the budget deficit largely unchanged and the debt-to- GDP ratio stable.