OTTAWA — Canadians will closely watch the fate of a newly negotiated trade pact, analysts said, after the American midterm elections brought Democrats to power in the House and injected a new element of uncertainty in trade relations.

Polls show that President Trump is widely unpopular among Canadians, experts noted, so the results may have given a measure of satisfaction to some.

“They’re going to be happy that this is a bit of a slap in the face of this president,” said Dane Rowlands, director of the Norman Paterson School of International Affairs at Carleton University in Ottawa.

But while many Canadians didn’t like Mr. Trump’s negotiating tactics and some aspects of the new trade accord, the United States-Mexico-Canada Agreement, there is a broad consensus that it is better than not having a deal at all with the United States, Canada’s largest export market.