Justin Trudeau’s Liberal Party has retained power in a narrow Canadian election win, but he will now be prime minister of a minority government.
The Liberals are projected to win 156 seats, 14 short of a majority, and will find it harder to pass legislation in Mr Trudeau’s second term.
The opposition Conservatives are expected to win the popular vote but have not translated that into seats.
They are projected to take 122, up from the 95 they held before.
Although Monday night’s results saw a sharp decline in seats for the country’s left-leaning New Democratic Party (NDP), its leader, Jagmeet Singh, could become the kingmaker.
The NDP is projected to take 24 seats in the 338-seat parliament.
Quebec’s separatist party, the Bloc Quebecois, which competes only in that province, fared much better. It is expected to take 32 seats, compared to the 10 it won in 2015.
Turnout is currently listed at 65%.
The federal election was seen as a referendum on Mr Trudeau, who endured a bumpy first term, tainted by scandal.
“You did it my friends. Congratulations!” he told cheering supporters in Montreal. Turning to address those across the country who voted for him, he said: “Thank you for having faith in us to move our country in the right direction.”
And to those who did not back him, he promised his party would govern for everyone.
His weakened grip on power is being seen as a rebuke of his record but the result is bitterly disappointing for Conservative leader Andrew Scheer.
Why has Trudeau’s popularity fallen?
Mr Trudeau swept into power in 2015 promising “real change” and a slew of progressive pledges.
But after four years in power, Mr Trudeau 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 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.
An ethics scandal early this year, known as the SNC-Lavalin affair, took a major toll on his support.
Last month an ethics watchdog found the prime minister had violated federal conflict of interest rules by improperly trying to influence a former minister in relation to a criminal trial facing major Canadian engineering firm SNC-Lavalin.
Mr Trudeau’s election odds then seemed at risk when images of the prime minister wearing blackface make-up in three separate instances were widely circulated.
The images were seen as a major hit to Mr Trudeau’s cultivated political image, characterised by compassion and inclusion.