Mark Carney's Liberals have won Canada's federal election - riding a backlash of anti-Trump sentiment to form the next government.
It is a stunning political turnaround for a party who were widely considered dead and buried just a few months ago.
It's not yet clear if the party - which has been in power for almost a decade - will be able to secure a majority as results continue to roll in.
Either way, the prime minister faces major challenges, including divisions in the country laid bare by the campaign.
Here are five takeaways from an election which saw the Conservative opposition make major gains but still lose.
There is no doubt the US president's tariff threats and comments undermining Canada's sovereignty played an outsized role in this election, suddenly making leadership and the country's economic survival the defining issues of the campaign.
Mark Carney used it to his advantage, running as much against Trump as he did against his main opposition rival, Conservative leader Pierre Poilievre.
Carney warned Canada was at a crisis moment, saying frequently on the campaign trail - and in his victory speech - that Trump "wants to break us so America can own us".
Poilievre brought Trump up much less frequently during the campaign, focusing his message on domestic issues - the cost of living, the housing affordability crisis, and crime - and targeting the Liberals for their record on those matters.
Carney - who has declared the old relationship with the US "over" - plans to start negotiations on a new economic and security relationship immediately following the election.
Kevin O'Leary, a Canadian businessman close to Trump who previously ran for the Conservative leadership, acknowledged it was a successful campaign strategy.
"Right now Canadians are very frustrated with America and Carney has used that to his advantage," he told the BBC just before polls closed. "He was able to distract Canadians from his own mistakes... and say 'Stop looking at that. Look south of the border and I can save you'."
At the start of the year, Carney was a former central banker with no experience as a politician. By mid-March, he was being sworn in as prime minister - the first to have never held elected public office before - after a resounding win in the Liberal leadership race.
Now, he's faced the Canadian electorate as a first time campaigner, won an Ottawa-area seat in the House of Commons and steered his party to an unlikely victory.
Carney had long flirted with entering Canadian politics - and he seized his moment, swooping in after former Prime Minister Justin Trudeau's sudden resignation in January.
He also took full advantage of the new political landscape, leaning into his experience helping Canada and the UK navigate previous crises at a time when Canadians were feeling anxious about their economic future.
Trump's late-March announcement of global levies on foreign automobile imports gave Carney the chance to publicly audition to keep his job during the campaign. He was able to step away from the trail and take on the prime minister's mantle, setting up a call with the president and meeting US Cabinet ministers.
In a different election, this would have been a successful one for the Conservatives.
In 2011, the Conservatives won a majority with 39.6% of the vote. Conservative leader Pierre Poilievre is on track to beat that this time, with roughly 41.6% of the vote with most polls reporting, according to Election Canada.
Poilievre's Conservatives also made significant seat gains. They are currently projected to have won 149 seats - that's up from 120 at dissolution, when the election was called in March.
But with the progressive vote coalescing around the Liberals, those numbers weren't enough this time.
This will be a bitter loss for the Conservatives, who only months ago had a clear path to victory and will now need to figure out a way forward after a series of electoral defeats.
"We have much to celebrate tonight," Poilievre said in his concession speech, nodding to the party's significant gains.
But he added: "We are cognisant of the fact that we didn't quite get over the finish line."
It will now be up to the party to decide if they want to keep Poilievre as leader, the third they've had since the Liberals swept the 2015 election.
Poilievre on Monday night pushed to keep his job, telling Conservative supporters that "change takes time".
The election results have highlighted divisions in Canada that could pose a challenge for Carney.
Notably, the Liberals are largely shut out of Alberta and Saskatchewan - oil-rich and gas-rich prairie provinces where a sense of alienation from the centre of power in Ottawa has long festered.
Even before the election, some in those regions were warning of a national unity crisis if the Liberals won another mandate.
Carney touched on those divisions in his victory speech, acknowledging the millions who had voted for a different outcome.
"I intend to govern for all Canadians," he said.
Meanwhile, Poilievre's message, which relentlessly focused on cost of living issues, especially on housing affordability, resonated with many young people.
Support for the Conservatives outpaced Liberals by 44% to 31.2% among 18 to 34 year olds, a Nanos poll on 25 April indicated. The divide was more stark among younger men.
Separately, Abacus Data polling found that about 18% of 18 to 29 year olds were worried about Trump. That jumped to 45% for voters over 60, suggesting a polarisation on issues between generations.
On Monday night, Poilievre remarked on demographic breakthroughs Conservative had made, including with younger Canadians.
"We gave voices to countless people across the country who've been left out and left behind for far too long," he said.
In this election, the smaller political parties have taken a hit as Canadians choose to park their votes with either the Liberals or the Conservatives - especially the left-wing New Democrats, or NDP.
Some of the smaller parties have lost a significant amount of vote share - particularly the NDP who have received just 6% of votes counted across Canada so far, compared with 18% in 2021.
Jagmeet Singh, who has been NDP leader for almost eight years, lost his own riding in British Columbia and announced he will step down.
"Obviously I know this night is a disappointing night for New Democrats," he said, adding: "We're only defeated if we stop fighting."
The Greens have also seen their vote share cut in half from 2% to 1%.
Shachi Kurl, president of the Angus Reid Institute, a non-profit public opinion research organisation, told the BBC that Trump's rhetoric was behind the shift to the Liberals.
"The threats, the annexation talk, all of that has been a huge motivator for left of centre voters," she said.
The sovereigntist Bloc Québécois have maintained a vote share of around 7%. They are on track to win 23 seats in Quebec.
This is based on around 97% of polls reporting.
Canada doesn't have a two-party system, even though it has historically voted in conservative or liberal governments in some form.
In the country's political system, these smaller parties still play a role in Parliament. Both the NDP and the Bloc have at some points formed Official Opposition in the House of Commons.
26 PerFlyer