Prime Minister Justin Trudeau's Liberal Party held onto power in a nail-biter of a Canadian general election on Monday, but as a weakened minority government.
Television projections as of 2 am Tuesday (0600 GMT) declared the Liberals winners or leading in 156 of the nation's 338 electoral districts, versus 122 for his main rival Andrew Scheer and the Conservatives, after polling stations across six time zones closed.
As early as Tuesday, Trudeau will have to form an alliance with one or more smaller parties in order to govern a fractured nation.
The first test of his future government will follow in the coming weeks with a speech to parliament outlining his legislative priorities and a confidence vote.
"From coast to coast to coast, tonight Canadians rejected division and negativity," Trudeau said. "And they rejected cuts and austerity and voted in favour of a progressive agenda and strong action on climate change."
He reassured Quebec that his Liberal government, despite an electoral setback in the French-speaking province, "will be there for you."
He also spoke directly to a growing sense of Western Canada's alienation within the federation, telling those in Saskatchewan and Alberta provinces: "I've heard your frustration."
The 47-year-old former school teacher dominated Canadian politics over the four years of his first term, but faced a grilling during the 40-day election campaign, which he described as one of the "dirtiest and nastiest" in Canadian history.
Trudeau and Scheer exchanged barbs as attack ads and misinformation multiplied.
Trudeau evoked the bogeymen of past and current Tory parties fostering "politics of fear and division" while Scheer called the prime minister a "compulsive liar," "a phony and a fraud."
Going into the election Trudeau's golden boy image had already been damaged by ethics lapses in the handling of the bribery prosecution of engineering giant SNC-Lavalin. His popularity took a further hit with the emergence during the campaign of old photographs of him in blackface makeup.
At one rally, the prime minister was forced to wear a bulletproof vest due to a security threat.
"Trudeau has really lost his halo. It's pretty tarnished," commented Lois Welsh, 77, in Regina, disappointed over the Liberal win.
Outside polling stations, Canadians told AFP they had wished for a more positive campaign focused on issues.
"I deplored the cheap shots during the campaign. I think we're better than that," said Andree Legault in Montreal.
In his concession speech, Scheer said, "Canadians have passed judgement on (Trudeau's) Liberal government," noting that the Liberals shed more than 20 seats as well as "support in every region of the country."
"Canada is a country that is further divided," he said, warning that its oil sector, the fourth largest in the world but struggling with low prices and a lack of pipeline capacity, is "under attack."
"We have put him on notice, his leadership is damaged and his government will end soon and when that time comes, the Conservatives will be ready and we will win!"
Some 27.4 million Canadians were eligible to vote in the election, and the turnout was reported to have been large, at almost 65 percent.
A record 97 women were elected to parliament, including Canada's first indigenous attorney general, Jody Wilson-Raybould, who ran as an independent candidate after Trudeau kicked her out of his caucus.
The night also saw Conservative deputy leader Lisa Raitt turfed and Liberal Public Safety Minister Ralph Goodale lose the seat he held for 26 years.
Scheer, only two years after winning the leadership of his party, struggled to win over Canadians with his bland minivan-driving dad persona and a throwback to the thrifty policies of past Tory administrations.
Social democrats and resuscitated Quebec separatists also chipped away at Liberal support.
The Bloc Quebecois came back from a ruinous 2015 election result, tapping into lingering Quebec nationalism to take 32 seats, while the New Democratic Party (NDP) won 24 seats, according to projections.
NDP leader Jagmeet Singh, a leftist former criminal defense lawyer, is the first non-white leader of a federal political party in Canada, and will likely emerge as kingmaker.
Michel Mercer in Montreal said he voted for the Liberals, but only to keep the Tories at bay.
"I would have voted NDP but I didn't want to see the Conservatives in power," he told AFP.
The Green Party, hopeful for a breakout, meanwhile managed to add only one seat, bringing its tally to three.
Ottawa, Canada | AFP