OTTAWA—Canadian Prime Minister
Justin Trudeau
shook up his cabinet Tuesday, including appointing a new foreign minister, as the country prepares for the Trump administration and its potential impact on the cross-border trade relationship.

The cabinet shuffle affected six portfolios. Chief among them was the appointment as foreign minister of Chrystia Freeland, who had served as trade minister. An author and former journalist, Ms. Freeland helped to complete a trade deal with the European Union following years of negotiations, and earned praise for navigating final approval amid turbulent political waters in Europe following the surprise Brexit vote and heightened antiglobalization rhetoric on the continent.

The cabinet shuffle came slightly more than a year after Mr. Trudeau’s Liberal Party assumed power, and just days before U.S. President-elect Donald Trump is to be sworn in. Last week, Mexican President Enrique Peña Nieto also named a confidant as his new foreign minister as Mexico braces for a more complex relationship with Washington.

Ms. Freeland, 48 years old, will succeed Stephane Dion, viewed by political commentators here as a weak link in cabinet, partly owing to his handling of certain politically sensitive files and his communication skills.

“If they are going to be dealing with the incoming Trump administration, they are going to need somebody who is an effective communicator and is gaffe free, and going to be taking Canada’s message and interests to Washington,” said Fen Osler Hampson, a fellow and director at the Centre for International Governance Innovation in Waterloo, Ontario.

Mr. Dion, 61 years old, said in a statement that he wished Ms. Freeland luck and would be leaving politics.

Mr. Trump “takes a trade-and-job lens to his engagements with the world,” Mr. Trudeau told reporters in explaining the cabinet shuffle, and why Ms. Freeland would maintain responsibility as Foreign Minister on matters related to U.S.-Canada trade. “It makes sense for the person who is responsible for foreign relations with the U.S. to also have the ability and responsibility to engage in issues such as a Nafta.”

It is common for Canadian prime ministers to make changes to cabinet every 18 months or so, political experts say, to promote other lawmakers and remove ministers who run into trouble with their portfolios. And Mr. Trudeau and the Liberal government continue to enjoy strong public-opinion support after 14 months in office. “But there’s no question the Trump factor played into this change in cabinet,” said Eric Miller, head of Washington-based Rideau Potomac Strategy Group, a consultancy that specializes in trade issues.

Ms. Freeland has been an outspoken critic of Russian President
Vladimir Putin,
and was added in 2014 to a list of westerners banned from visiting Russia. Ms. Freeland’s approach to the region contrasts sharply with that of
Rex Tillerson,
Mr. Trump’s nominee for secretary of state, whose ties to Mr. Putin have come under scrutiny since his nomination.

The U.S. and Canada have one of the largest trading relationships in the world, with two-way trade totaling $474.4 billion during the first three quarters of 2016, according to data from the U.S. Bureau of Economic Analysis. Canada also is a signatory to the North American Free-Trade Agreement, or Nafta, which Mr. Trump has vowed to renegotiate and extract better terms for the U.S.

Most of Mr. Trump’s focus on Nafta has been on Mexico, although economists warn the Canadian economy could also take a deep hit depending on what the Trump White House has in mind for Nafta. Policies as proposed on the campaign trail by Mr. Trump could weigh on Canada’s gross domestic product by as much as 4%, according to modeling done by Export Development Canada.

Some of Mr. Trudeau’s closest aides have met with senior officials from the Trump transition team over the past few weeks, according to a person familiar with the gatherings. Initial talks have been encouraging, the person said, although Canadian officials remain worried about the ramifications of Mr. Trump’s Nafta policy on growth.

Other cabinet changes of note included a new immigration minister, Ahmed Hussen, a lawyer and well-known figure in Toronto’s Somali community, who came to Canada as a refugee in the early 1990s after fleeing Somalia.

François-Philippe Champagne, former vice president and corporate counsel at Switzerland-based
ABB Ltd.
, was named trade minister, succeeding Ms. Freeland.