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, though it wasn’t immediately clear if they would win an outright majority — at least 172 — or would need to rely on one of the smaller parties to form a government and 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 the threats coming from Washington. He also reiterated a belief he shared while campaigning: that 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 — 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 speech conceding defeat and with his own seat in the House of Commons still in doubt, Poilievre vowed to keep fighting for Canadians and their right to an affordable home on a safe street.

“We are cognizant of the fact that we didn't get over the finish line yet," Poilievre told his 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 on social media that he was on their ballot and repeating that Canada should become the 51st state. 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.

“The Americans want to break us so they can own us,” Carney said in the runup to election day. “Those aren't just words. That's what's at risk.”

As Poilievre and his wife cast their ballots in Ottawa on Monday, 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

Conservative Leader Pierre Poilievre and his wife Anaida at his campaign headquarters on election night, in Ottawa, Tuesday, April 29, 2025. (Christinne Muschi/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. (Frank Gunn/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

NDP Leader Jagmeet Singh, center, walks with his wife Gurkiran Kaur as he arrives to address supporters on election night, in Burnaby, B.C., on Monday, April 28, 2025. (Darryl Dyck/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Liberal Party's supporters cheer on results at the party election night headquarters in Ottawa, 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 kiss at his campaign headquarters on election night, in Ottawa, Tuesday, April 29, 2025. (Adrian Wyld/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

Canada's new Prime Minister and Liberal Leader Mark Carney casts his vote in Ottawa, Ontario, Monday, April 28, 2025. (Sean Kilpatrick/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Canada's new Prime Minister and Liberal Leader Mark Carney and his wife Diana Fox Carney take in the results on election night in Ottawa, Ontario, Monday, April 28, 2025. (Sean Kilpatrick/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

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

Credit: AP

icon to expand image

Credit: AP

Conservative Leader Pierre Poilievre, right, and his wife Anaida Poilievre cast their votes in the federal election in Ottawa, Canada, Monday, April 28, 2025 in Ottawa. (Adrian Wyld/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

A sign for a federal election voting center stands near the memorial for the victims of a driver who rammed into a crowd during a Filipino heritage festival in Vancouver, British Columbia, Monday, April 28, 2025. (AP Photo/Lindsey Wasson)

Credit: AP

icon to expand image

Credit: AP

NDP Leader Jagmeet Singh arrives for a sign waving campaign event with Port Moody-Coquitlam NDP candidate Bonita Zarrillo and volunteers on election day, in Port Moody, British Columbia, Monday, April 28, 2025. (Darryl Dyck/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

Conservative Leader Pierre Poilievre speaks at a rally in Oakville, Ontario, Sunday, April 27, 2025. (Laura Proctor/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Conservative Leader Pierre Poilievre speaks to supporters with his wife Anaida Poilievre at his campaign headquarters on election night, in Ottawa, Tuesday, April 29, 2025. (Spencer Colby/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Diana Fox Carney, left, votes in Ottawa, Ontario, Monday, April 28, 2025. (Sean Kilpatrick/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Voters line up at a polling location at the Collingwood Neighbourhood House in Vancouver, British Columbia, Monday, April 28, 2025. (AP Photo/Lindsey Wasson)

Credit: AP

icon to expand image

Credit: AP

Canadian Prime Minister Mark Carney greets attendees as he arrives to address supporters at his campaign headquarters on election night in Ottawa, Ontario, Tuesday, April 29, 2025. (Nathan Denette/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

A voting sign stands near a memorial for victims after a vehicle drove into a crowd during a Filipino heritage festival in Vancouver, British Columbia, Monday, April 28, 2025. (AP Photo/Lindsey Wasson)

Credit: AP

icon to expand image

Credit: AP

Canada's new Prime Minister and Liberal Leader Mark Carney and his wife Diana Fox Carney take in the results on election night in Ottawa, Ontario, Monday, April 28, 2025. (Sean Kilpatrick/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

NDP Leader Jagmeet Singh kisses his wife Gurkiran Kaur as he pauses while addressing supporters on election night, in Burnaby, B.C., on Monday, April 28, 2025. (Darryl Dyck/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Bloc Québécois Leader Yves-Francois Blanchet, center left, greets supporters on election night, in Montreal, Tuesday, April 29, 2025. (Christopher Katsarov/The Canadian Press via AP)

Credit: AP

icon to expand image

Credit: AP

Bloc Québécois Leader Yves-Francois Blanchet speaks to supporters on election night, in Montreal, Tuesday, April 29, 2025. (Christopher Katsarov/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