Justin Trudeau believed his adept response to the pandemic would help him handily win re-election as prime minister, and he did Monday, but his gamble to try to gain an absolute majority didn't pay off.

The first-born son of the late prime minister Pierre Trudeau had swept to power in a landslide in 2015, with a mop of dark curly hair and confident swagger, jumping into crowds to take selfies with adoring young fans.

Six years later, at 49, he faced a barrage of criticism on the campaign trail, and even threats.

After doling out hundreds of billions of dollars in Covid aid to workers and businesses, Trudeau triggered the snap election seeking to regain the majority in parliament he'd lost in 2019.

But on the hustings he found himself in a horse race with rookie Conservative leader Erin O'Toole, going from Canada's "golden boy to veteran pugilist throwing whatever punches necessary to stay in the ring," according to pollster Tim Powers.

Trudeau managed to squeak in a win by convincing voters to stay the course at this pivotal juncture in the pandemic that has seen new outbreaks led by the Delta variant.

University of Winnipeg politics professor Felix Mathieu, however, said Trudeau could now face a challenge for the leadership of his party "because he lost his bet" for a majority government.

Canada's liberal prime minister Justin Trudeau wins re-election
Canada's liberal prime minister Justin Trudeau wins re-election AFP / Andrej Ivanov

Also, he told AFP, "It remains to be seen how long his minority government will last." It is Canada's fifth minority government since 2004, each having lasted no more than two years.

The world watched with interest, even admiration, as Trudeau proclaimed in 2015 after almost a decade of Tory rule: "Canada is back!"

"Why can't he be our president?" shouted a Rolling Stone magazine cover from the United States featuring Trudeau.

Now, fatigue with his administration is palpable.

Past scandals re-emerged, including his firing of Canada's first indigenous attorney general for accusing Trudeau of meddling in the bribery prosecution of engineering giant SNC-Lavalin.

Combined with missed high expectations, these plunged the Liberal leader's popularity.

Canada's liberal prime minister Justin Trudeau campaigned hard for a third mandate and it paid off
Canada's liberal prime minister Justin Trudeau campaigned hard for a third mandate and it paid off GETTY IMAGES NORTH AMERICA / Cole Burston

At rallies, he was dogged by protesters he described as "anti-vaxxer mobs," some of whom threw stones at the prime minister.

There was also pushback over the timing of Trudeau's call for an election, only two years after the last vote and just as the nation emerged from pandemic lockdowns.

Addressing the backlash, Trudeau said this election was the most important since World War II.

He highlighted "stark" policy differences between his party and their rivals on mandatory vaccinations, child care and the environment, and emphasized the need for a new mandate to steer Canada's pandemic exit.

But he was unable to rekindle the spark of his 2015 campaign, which had not been seen in Canadian politics since the "Trudeaumania" that hailed his father's entry into politics a half century earlier.

"The enthusiasm and excitement that greeted Trudeau's 2015 victory has vanished," said University of British Columbia politics professor Max Cameron.

"Whether it's climate change or reconciliation with indigenous peoples, for example, Trudeau has been less transformational than I think many people had hoped," he explained.

Coming late to politics after working as a snowboard instructor, bartender, bouncer and teacher, Justin Trudeau was first elected in 2008 to the House of Commons to represent a working-class Montreal neighborhood.

In his first two terms as prime minister, he brought in Senate reforms, signed a new trade deal with the United States and introduced a carbon tax to reduce Canada's greenhouse gas emissions.

The married father of three also legalized cannabis, held a public inquiry into missing and murdered indigenous women and passed legislation permitting medically assisted suicide.

But Canada's CO2 emissions are not as low as many had hoped they would be by this point. And 32 indigenous communities, down from a peak of 111, are still under boil water advisories, according to government data, despite Trudeau's pledge to fix the public health hazard in already marginalized areas.

On the world stage, meanwhile, former Trudeau advisor Jocelyn Coulon told AFP: "Canada was a country with a strong international voice, but under Trudeau we've been more spectators than players."