TORONTO (AP) — Prime Minister Mark Carney’s Liberal Party won Canada’s federal election on Monday, capping a stunning turnaround in fortunes fueled by U.S. 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 Conservatives. It wasn’t immediately clear, though, if they would win an outright majority — at least 172 — or would need to rely on one of the smaller parties to pass legislation.

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.

In a victory speech before supporters in Ottawa, Carney stressed the importance of Canadian unity in the face of Washington's threats. He also said the mutually beneficial system Canada and the U.S. had shared since World War II had ended.

“We are over the shock of the American betrayal, but we should never forget the lessons,” he said.

“As I've been warning for months, America wants our land, our resources, our water, our country," Carney said. "These are not idle threats. President Trump is trying to break us so America can own us. That will never ... ever happen. But we also must recognize the reality that our world has fundamentally changed.”

A defeat for the Conservatives

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.

In a concession speech and with his own House of Commons seat still in doubt, Poilievre vowed to keep fighting for Canadians.

“We are cognizant of the fact that we didn't get over the finish line yet," Poilievre told supporters in Ottawa. "We know that change is needed, but change is hard to come by. It takes time. It takes work. And that's why we have to learn the lessons of tonight — so that we can have an even better result the next time Canadians decide the future of the country.”

Even with Canadians grappling with the fallout from a deadly weekend attack at a Vancouver street festival, Trump was trolling them on election day, suggesting again on social media that Canada should become the 51st state and saying he was on their ballot. He also erroneously claimed that the U.S. subsidizes Canada, writing, "It makes no sense unless Canada is a State!"

Trump's truculence has infuriated Canadians, leading many to cancel U.S. vacations, refuse to buy American goods and possibly even vote early. A record 7.3 million Canadians cast ballots before election day.

As Poilievre and his wife cast their ballots in Ottawa, he implored voters to “Get out to vote — for a change." After running a Trump-lite campaign for weeks, though, the Conservative leader's similarities to the bombastic American might have cost him.

Reid Warren, a Toronto resident, said he voted Liberal because Poilievre “sounds like mini-Trump to me.” And he said Trump’s tariffs are a worry.

“Canadians coming together from, you know, all the shade being thrown from the States is great, but it’s definitely created some turmoil, that’s for sure,” he said.

Historian Robert Bothwell said Poilievre appealed to the “same sense of grievance” as Trump, but that it ultimately worked against him.

“The Liberals ought to pay him," Bothwell said, referring to the U.S. president. "Trump talking is not good for the Conservatives.”

The Liberal way forward

Carney and the Liberals secured a new term, but they have daunting challenges ahead.

If they don't win a majority in Parliament, the Liberals might need rely on one of the smaller parties to remain in power and pass legislation. The Bloc Québécois, which looked set to finish third, is a separatist party from French-speaking Quebec that seeks independence from Canada. Trudeau’s Liberals relied on the New Democrats to remain in power for four years, but the progressive party faired poorly on Monday and its leader, Jagmeet Singh, said he was stepping down after eight years in charge.

“This is a dramatic comeback, but if the Liberals cannot win a majority of seats, political uncertainty in a new minority Parliament could complicate things for them,” said McGill University political science professor Daniel Béland.

Until this year, foreign policy hadn’t dominated a Canadian election this much since 1988, when, ironically, free trade with the United States was the prevailing issue.

In addition to the trade war with the U.S. and frosty relationship with Trump, Canada is dealing with a cost-of-living crisis. And more than 75% of its exports go to the U.S., 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.

While campaigning, Carney vowed that every dollar the the government collects from counter-tariffs on U.S. goods will go toward Canadian workers who are adversely affected by the trade war. He also said he plans to keep dental care in place, offer a middle-class tax cut, return immigration to sustainable levels and increase funding to Canada's public broadcaster, the Canadian Broadcasting Corporation.

___

Associated Press reporter Mike Householder contributed to this report.

Canadian Prime Minister Mark Carney smiles on stage at his campaign headquarters after the Liberal Party won the Canadian election in Ottawa, Ontario, Tuesday, April 29, 2025. (Frank Gunn/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Canadian Prime Minister Mark Carney speaks to supporters on stage at his campaign headquarters after the Liberal Party won the Canadian election in Ottawa, Ontario, Tuesday, April 29, 2025. (Justin Tang/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Canadian Prime Minister Mark Carney speaks to supporters on stage at his campaign headquarters after the Liberal Party won the Canadian election in Ottawa, Tuesday, April 29, 2025. (Justin Tang//The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Elections Canada signage is seen as voters arrive at a polling station on Election Day in Halifax, Canada, Monday, April 28, 2025. (Darren Calabrese/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Liberal Party supporters cheer on results at the party election night headquarters in Ottawa, Ontario, Monday, April 28, 2025. (Nathan Denette/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Conservative Leader Pierre Poilievre and his wife Anaida Poilievre wave as they leave the stage Tuesday, April 29, 2025 in Ottawa. (Adrian Wyld/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

New Democratic Party Leader Jagmeet Singh addresses supporters accompanied by his wife Gurkiran Kaur at his campaign headquarters on election night, in Burnaby, B.C., Monday, April 28, 2025. (Ethan Cairns/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Canadian Prime Minister Mark Carney and his wife Diana Fox Carney react on stage at his campaign headquarters after the Liberal Party won the Canadian election in Ottawa on Tuesday, April 29, 2025. (Frank Gunn/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Canadian Prime Minister Mark Carney arrives on stage at his campaign headquarters after the Liberal Party won the Canadian election in Ottawa on Tuesday, April 29, 2025. (Justin Tang/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Canadian Prime Minister Mark Carney reacts with wife Diana Fox Carney on stage at his campaign headquarters after the Liberal Party won the Canadian election in Ottawa on Tuesday, April 29, 2025. (Sean Kilpatrick/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Canadian Prime Minister Mark Carney, center, dances to Canadian band Down With Webster as they play live from campaign headquarters after the Liberal Party won the Canadian election in Ottawa on Tuesday, April 29, 2025. (Sean Kilpatrick/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Canadian Prime Minister Mark Carney, center, dances to Canadian band Down With Webster as they play live at campaign headquarters after the Liberal Party won the Canadian election in Ottawa on Tuesday, April 29, 2025. (Sean Kilpatrick/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP