Justin Trudeau government's comeback seems low prospect amidst strong opposition (File)

Canadians vote in a general election Monday with polling predicting a minority government as Prime Minister Justin Trudeau's Liberal Party risks losing its majority or even being kicked out of office.

The Liberals and the Conservatives, led by Andrew Scheer, could be set for a near dead heat with pundits calling it one of the nation's closest elections ever.

But neither of the two parties that have led Canada since Confederation in 1867 is forecast to win enough support to secure an absolute majority of seats in parliament.

At final campaign stops in westernmost British Columbia on Sunday, former golden boy Trudeau made an emotional appeal to voters to enable him to build on the achievements of his first term.

He warned against Scheer's pledged roll-back of environmental protections including a federal carbon tax that discourages the use of large amounts of fossil fuels.

"We need a strong, progressive government that will unite Canadians and fight climate change -- not a progressive opposition," Trudeau told a rally in a suburb of Vancouver after whistle-stops in Ontario, Manitoba and Alberta.

"We need to unite as citizens. We need to unite as a planet."

After winning in a 2015 landslide -- in a repeat of the wave of support that in 1968 carried his late father Pierre to power -- Trudeau's star has dimmed while in office.

His image has been tainted by ethics lapses in the handling of the bribery prosecution of an engineering giant, while his campaign was rocked by the emergence of old photographs of him in blackface make-up.

Surging social democrats and resuscitated Quebec separatists have also chipped away at Liberal support.

Main parties both struggle

If Trudeau hangs on, it will be because Scheer has struggled to win over Canadians with his bland minivan-driving dad persona and a throwback to the thrifty policies of past Tory administrations.

Canadians "cannot afford" a Liberal government propped up by the third-place New Democratic Party (NDP), Scheer said at the end of a marathon last push from the Atlantic to Pacific oceans.

"We can only imagine what the NDP's price would be to keep Justin Trudeau in power," he said.

"Whatever it is, we know Trudeau would pay any price to stay in power and he'd use your money to do it."

The first polling stations open at 0830 am (1100 GMT) in Newfoundland, Canada's most easterly province.

The 40-day campaign, described by Trudeau as "one of the dirtiest, nastiest" in Canadian history, has been "a desert from a public-policy point of view," according to pollster Nik Nanos of Nanos Research.

Attack ads sometimes skirted the truth with accusations that Liberals would legalize hard drugs and the Tories would allow the proliferation of assault weapons.

At one rally, Trudeau was forced to wear a bulletproof vest.

The nation's top bureaucrat earlier this year warned that public discourse had fallen to such a low level that he "worried that somebody is going to be shot... during the political campaign."

Along the bruising way, Trudeau and Scheer traded barbs.

Trudeau evoked the boogeymen of past and current Tory parties fostering "politics of fear and division" and Scheer called the prime minister a "compulsive liar," "a phoney and a fraud."

Trudeau defends record

Trudeau defended his record: a strong economy and low unemployment, legal cannabis, the resettlement of 60,000 Syrian refugees, doctor-assisted deaths, a public inquiry into missing and murdered indigenous women, and free trade deals with Europe, Pacific nations and North American neighbors.

Former US president Barack Obama chimed in with an endorsement, calling Trudeau an "effective leader who takes on big issues like climate change."

"The world needs his progressive leadership now," Obama said in a tweet.

The Conservatives, meanwhile, have stood alone among all of the parties in pledging austerity measures to return to a balanced budget within five years.

Scheer found himself on the back foot late in the campaign over revelations of his American dual citizenship and allegations that his party hired a communications firm to "destroy" the upstart People's Party, led by former Conservative foreign minister Maxime Bernier.

The party has situated itself to the right of the Conservatives and could draw votes away.

On the left, the Bloc has come back from a ruinous 2015 election result, tapping into lingering Quebec nationalism to challenge the Liberals' dominance in the province.

The Bloc and NDP have said they would not prop up the Tories if they secure a minority.

Preliminary results across six time zones are expected shortly after 7:00 pm Ottawa time (2300 GMT).

But with many moving parts in play, who will govern may still be up in the air for several weeks during tricky alliance negotiations that could keep Trudeau in office even if his party loses.