Canadians packed into long queues to cast ballots in elections that are headed for a photo finish, with liberal Prime Minister Justin Trudeau's bid for a third term threatened by rookie conservative leader Erin O'Toole's strong challenge.

Mr Trudeau called the snap election hoping to parlay a smooth Covid-19 vaccine roll-out - among the best in the world - into a new mandate to steer the nation's pandemic exit, without having to rely on opposition party support to pass his agenda.

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

A sudden surge in Covid-19 cases led by the Delta variant late in the campaign, after the lifting of most public health measures this summer, has also muddied the waters.

Voting across Canada's six time zones started early in the Atlantic island province of Newfoundland and was to wrap up in westernmost British Columbia at 7pm (3am Irish time).

Mr Trudeau said he felt "serene" after casting a ballot in Montreal.

"We worked very hard during this campaign, and Canadians are making an important choice," he told AFP, flanked by his wife Sophie Gregoire and their children.

At 49, Mr Trudeau has faced tougher bouts and come out unscathed.

But after six years in power, his administration is showing signs of fatigue, and it's been 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.

Entering the final stretch, the two main political parties that ruled Canada since its 1867 confederation were virtually tied, with about 31% support each, and four smaller factions nipping at their heels.

To keep his job, MrTrudeau's Liberals must win a plurality of seats in Parliament and take at least 170 for a majority.

Pollster and former political strategist Tim Powers advised not counting Mr Trudeau out. "I still think Justin Trudeau will win a minority government," he told AFP.

"But is that a win for him?" he added, suggesting Nr Trudeau may be turfed as leader if the Liberals fare poorly at the ballot box.

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

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

Meanwhile Mr O'Toole, 48, 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 polarising election. There's actually a lot of clustering around the middle."

Mr O'Toole, a relative unknown who became Tory leader only last year, tracked his party to the political centre, forcing the Liberals to compete for votes on the left with the New Democrats and Greens, as well as the separatist Bloc Quebecois.

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