Canadians returned Liberal Prime Minister Justin Trudeau to power in hotly contested elections against a rookie conservative leader, but he failed to gain an absolute majority, according to preliminary results early Tuesday.

Trudeau called the snap polls last month, hoping to parlay a smooth Covid-19 vaccine rollout -- among the best in the world -- into a new mandate to steer the nation's pandemic exit and pass his agenda without opposition support.

Canadian Prime Minister Justin Trudeau, fighting for his political survival, makes a final pitch to voters in Maple, Canada ahead of Monday's election Canadian Prime Minister Justin Trudeau, fighting for his political survival, makes a final pitch to voters in Maple, Canada ahead of Monday's election Photo: GETTY IMAGES NORTH AMERICA / Cole Burston

But after a bumpy five weeks of campaigning, he appeared set for a repeat of the close 2019 general election, which resulted in the one-time golden boy of Canadian politics clinging to power yet weakened after losing his majority in parliament.

"You (Canadians) are sending us back to work with a clear mandate to get Canada through this pandemic into the brighter days ahead," Trudeau said, flanked by his wife Sophie Gregoire and their children on stage at a victory gala.

"That's exactly what we are ready to do," he said.

Erin O'Toole, leader of Canada's Conservative Party, elbow bumps supporters at a rally in his home electoral district of Dundas in the final week of campaigning ahead of Monday's snap election Erin O'Toole, leader of Canada's Conservative Party, elbow bumps supporters at a rally in his home electoral district of Dundas in the final week of campaigning ahead of Monday's snap election Photo: GETTY IMAGES NORTH AMERICA / Cole Burston

The Liberals had won or were leading in 158 seats, far short of the 170 needed for a majority, while the opposition Conservatives were heading for 119, according to preliminary results from Elections Canada, with the new parliament set to look little different to the outgoing one.

While thanking his supporters, Trudeau vowed to work for all Canadians.

Canadian party leaders debated ahead of Monday's election in which smaller factions could be spoilers for the two frontrunners -- the Liberals and the Conservatives Canadian party leaders debated ahead of Monday's election in which smaller factions could be spoilers for the two frontrunners -- the Liberals and the Conservatives Photo: POOL / Adrian Wyld

"Because no matter how you voted ... I hear you, I hear you when you say we can only move forward if no one is left behind," he said.

At 49, Trudeau had faced tougher political bouts and still came out unscathed.

After six years in power, however, his administration is showing signs of fatigue, and it was an uphill battle for him to convince Canadians to stick with his Liberals after falling short of high expectations set in his 2015 landslide win.

People line up at a Montreal polling station to vote in hotly-contested Canadian snap elections People line up at a Montreal polling station to vote in hotly-contested Canadian snap elections Photo: AFP / Andrej Ivanov

IMAGES Justin Trudeau speaks after winning a hotly contested election in Canada to be returned as Prime Minister, though projections show he failed to gain an absolute majority. "You are sending us back to work with a clear mandate to get us through the IMAGES Justin Trudeau speaks after winning a hotly contested election in Canada to be returned as Prime Minister, though projections show he failed to gain an absolute majority. "You are sending us back to work with a clear mandate to get us through the pandemic and to the brighter days ahead," Trudeau said. Photo: AFPTV / Agnes BUN

Entering the final stretch of the contest, Liberals and Conservatives -- the two main political parties that have ruled Canada since its 1867 confederation -- were virtually tied, with about 31 percent support each in public opinion polls, and four smaller factions nipping at their heels.

Pollster Tim Powers predicted a Liberal minority win.

"But is that a win for him?" he said, noting that Trudeau had hoped for more than just a plurality of seats.

Composition of the new Canadian parliament after elections on Monday September 20, and seat distribution for the outgoing parliament. Composition of the new Canadian parliament after elections on Monday September 20, and seat distribution for the outgoing parliament. Photo: AFP / Jonathan WALTER

"In the end, this election was ultimately for nothing," University of Winnipeg politics professor Felix Mathieu told AFP, pointing to the projected seat count for each party as being similar to the split in the last parliament, with most incumbents re-elected.

In a concession speech, Conservative leader Erin O'Toole, 48, recalled Trudeau having pulled the plug on the last minority parliament he said was "unworkable."

"But tonight Canadians did not give Mr Trudeau the majority mandate he wanted," he said.

"In fact, Canadians sent him back with another minority at the cost of 600 million dollars (US$470 million) and deeper divisions in our great country."

Meanwhile, in Vancouver New Democratic Party leader Jagmeet Singh congratulated Trudeau and vowed to keep fighting on climate change and a range of social issues.

"I want you to know our fight for you will continue," said Singh, whose party is looking at 25 seats.

The campaign saw the contenders spar over climate actions, indigenous reconciliation, affordable housing, mandatory Covid-19 inoculations and vaccine passports.

At rallies, Trudeau was dogged by what he described as "anti-vaxxer mobs," including one that threw stones at him.

O'Toole, meanwhile, was knocked for his backing of Alberta and two other Tory-led provinces' loosening of public health restrictions too soon, with Covid outbreaks now forcing their overwhelmed hospitals to fly patients across Canada for care.

He also fumbled over gun control and was warned by Beijing, according to Chinese state media, that his proposed hard line on China -- Canada's second-largest trading partner, with whom relations have soured over its detention of two Canadians -- would "invite counterstrikes."

Overall, commented Max Cameron, a politics professor at the University of British Columbia, "this hasn't been a polarizing election. There's actually a lot of clustering around the middle."

The Conservatives, however, also saw their support clawed by former foreign minister Maxime Bernier's far-right People's Party.