Prime Minister Mark Carney's Liberal Party has won Canada's federal election, capping a stunning turnaround in fortunes fuelled by US President Donald Trump's annexation threats and trade war.Â
After polls closed, the Liberals were projected to win more of Parliament's 343 seats than the Conservative Party, though it wasn't immediately clear if they would win an outright majority that would allow them to pass legislation without needing help.
The Liberals looked headed for a crushing defeat until the American president started attacking Canada's economy and threatening its sovereignty, suggesting it should become the 51st state.
Trump's actions infuriated Canadians and stoked a surge in nationalism that helped the Liberals flip the election narrative and win a fourth-straight term in power.
"We were dead and buried in December. Now we are going to form a government," David Lametti, a former Liberal justice minister, told CTV.
"We have turned this around thanks to Mark."
The Conservative Party's leader, Pierre Poilievre, hoped to make the election a referendum on former prime minister Justin Trudeau, whose popularity declined toward the end of his decade in power as food and housing prices rose.
But Trump attacked, Trudeau resigned and Carney, a two-time central banker, became the Liberal Party's leader and prime minister.
Trump was even trolling Canada on election day, suggesting on social media that he was in fact on the ballot and repeating that Canada should become the 51st state - an assertion Canadians find deeply insulting.
He also erroneously claimed that the US subsidises Canada, writing, "It makes no sense unless Canada is a State!"
Poilievre, who has been criticised for not taking a firmer stance against Trump, responded with a post of his own.
"President Trump, stay out of our election. The only people who will decide the future of Canada are Canadians at the ballot box," he posted hours before polls closed.
Trump's truculence has infuriated many Canadians, leading many to cancel US vacations, refuse to buy American goods and possibly even vote early. A record 7.3 million Canadians cast ballots before election day.
"The Americans want to break us so they can own us," Carney said in the run-up to the election. "Those aren't just words. That's what's at risk."
Election day came as the nation grappled with the fallout from a deadly weekend attack at a Vancouver street fair that led to the suspension of campaigning for several hours. Police ruled out terrorism and said the suspect is a local man with a history of mental health issues.
Poilievre implored voters to "Get out to vote - for a change" as he and his wife cast their ballots Monday in their Ottawa district.
After Trump seized the election spotlight, though, his similarities to the bombastic American president might have cost him.
Historian Robert Bothwell said Poilievre appealed to the "same sense of grievance" as Trump, and that, "It's like Trump standing there saying, 'I am your retribution'."
"The Liberals ought to pay him," Bothwell added, referring to the American president. "Trump talking is not good for the Conservatives."
Foreign policy hadn't dominated a Canadian election as much since 1988 when, ironically, free trade with the United States was the prevailing issue.
Carney and the Liberals cleared a big hurdle by winning a fourth-straight term, but they have daunting challenges ahead.
In addition to the sweeping US tariffs on Canadian goods, Canada has been dealing with a cost-of-living crisis for some time.
And more than 75 per cent of its exports go to the US, so Trump's tariffs threat and his desire to get North American automakers to move Canada's production south could severely damage the Canadian economy.