TORONTO — New Canadian Prime Minister Mark Carney and his Conservative opponent kicked off their election campaigns Sunday against the backdrop of a trade war and annexation threats from President Donald Trump.

Carney also announced that there will be a five-week campaign before the vote on April 28.

The governing Liberals had appeared poised for a historic election defeat this year until Trump declared a trade war. Trump has repeatedly said Canada should become the 51st U.S. state, and he acknowledged Friday that he has upended Canadian politics.

Trump’s almost daily attacks on Canada’s sovereignty have led to a surge in Canadian nationalism that has bolstered Liberal poll numbers.

“President Trump claims that Canada isn’t a real country. He wants to break us so America can own us. We will not let that happen,” Carney said.

The governing Liberals had appeared poised for a historic election defeat this year until then-Prime Minister Justin Trudeau announced his resignation and Trump declared a trade war.

The election campaign for 343 seats or districts in the House of Commons will last 37 days. Other parties are running, but the Liberals and the Conservatives are the only two that have a chance to form a government. The party that commands a majority in Parliament, either alone or with the support of another party, will form the next government, and its leader will be prime minister.

Carney succeeded Trudeau, who announced his resignation in January but remained in power until the Liberal Party elected a new leader on March 9 following a leadership race by the governing party.

The opposition Conservatives hoped to make the election about Trudeau, whose popularity declined as food and housing prices rose and immigration surged. But after decades of bilateral stability, the vote is now expected to focus on who can deal with Trump.

Trump put 25% tariffs on Canada’s steel and aluminum and is threatening sweeping tariffs on all Canadian products — as well as all of America’s trading partners — on April 2.

Pierre Poilievre, the leader of the Conservatives, is Carney’s main challenger. The party and Poilievre were heading for a huge victory in Canada’s federal election this year until Trump’s near-daily trade and annexation threats.

Poilievre said he will stand up to Trump, but Alberta Premier Danielle Smith, a conservative ally, said in an interview that Poilievre would be “very much in sync” with the “new direction in America.”

Poilievre said as he launched his campaign: “I will insist the president recognizes the independence and sovereignty of Canada. I will insist he stops tariffing our nation.”

Carney, 60, was the head of the Bank of Canada during the 2008 financial crisis. In 2013, he became the first noncitizen of the U.K. to run the Bank of England, helping to manage the impact of Brexit.

Poilievre, 45, for years the party’s go-to attack dog, is a career politician and firebrand populist who says he will put “Canada first.”