Justin Trudeau’s Liberal Party has retained power but as a minority government, according to projections by Canada’s national broadcaster, CBC.
Despite some early losses in Canada’s eastern provinces, the Liberals are expected to claim the most seats in parliament, giving them a second term.
This federal election was seen as a referendum on Mr Trudeau, who endured a bumpy first term, tainted by scandal.
His Liberals were neck-and-neck with their centre-right Conservative rivals.
Mr Trudeau’s weakened grip on power will force him to work with other parties to pass legislation during this next term.
There are still lots of votes to count so it is unclear how each party will ultimately fare.
But if the projection proves to be correct, it will be a bitterly disappointing result for Conservative leader Andrew Scheer.
Mr Trudeau swept into power in 2015 promising “real change” and a slew of progressive pledges.
Now, after four years in power, Mr Trudeau has faced criticism for his ability to follow through.
His environmental record, for example, has been undercut by his support for the Trans Mountain oil pipeline expansion project and his purchase pipeline infrastructure to ensure it goes ahead.
Canada is also not on track to meet its Paris Agreement greenhouse gas reduction target of 30% below 2005 levels by 2030.
And Mr Trudeau’s vow to institute federal electoral reform was quickly abandoned, angering some left-leaning voters excited by the prospect of seeing an alternative voting system
Still, according to an independent assessment by two dozen Canadian academics, Mr Trudeau has kept – fully or partially – 92% of these promises, the most by any Canadian government in 35 years.
By Jessica Murphy, Montreal
The mood is joyful if not jubilant in the Liberal election night headquarters in Montreal, where a growing crowd of supporters are cheering results showing Liberal wins as they come up on the big screens.
They may not have their majority but the Liberals are on track to win the most seats – and projections currently suggest it’s not as close a race between the Liberals and Conservatives as some polls had suggested.
As one young supporter, Adam Steiner, 18, told the BBC, a minority scenario is “not great” but at least the party “kept the Conservatives out of power”.
What does this mean for Justin Trudeau?
If he does form a minority government it’ll mean compromises, since his Liberals will need the support of other parties if he wants to hold onto power.
Early returns pointed to trouble for Mr Trudeau. His sweep of the Atlantic region was quickly upended, with Conservative and New Democratic wins in the east.
But while the Liberals did not repeat their 2015 landslide, they still kept six of their seven seats in Newfoundland and Labrador – Canada’s easternmost province.
CBC is also predicting that the party will retain the seats of three high-profile Members of Parliament throughout the Atlantic, including Lawrence MacAulay in Cardigan, Prince Edward Island, Dominic LeBlanc in Beauséjour and Geoff Regan in Halifax West.
It’s a disappointing turn for the Mr Scheer, who pitched himself to Canadians as the candidate for pocketbook issues, but also faced scrutiny over where the Conservative Party stands on social issues.
Tonight’s results could be good news for the country’s left-leaning New Democratic Party (NDP) and its leader Jagmeet Singh, who could be crowned kingmaker in a minority government.