Canada’s Finance Minister Bill Morneau and some of his G20 counterparts have privately exchanged concerns about the impact on international financial markets and the potential harm to the fragile global economy of a Donald Trump presidency.

Prime Minister Justin Trudeau has held similar worried discussions with world leaders, including Mexican President Enrique Pena Nieto and U.S. President Barack Obama, federal insiders say.

Officially the government has a firm policy of not commenting on the American presidential election, but unofficially a Trump win is high on the radar of the Liberal cabinet as Mr. Trump has begun to close the gap in the polls with Hillary Clinton, the Democratic nominee.

“I will go about my work as Minister of Finance and leave the opining of the U.S. election to you,” Mr. Morneau told reporters Tuesday when asked if it was time for Canada to stand up to Mr. Trump, who called the North American free-trade agreement the “worst trade deal in history” in Monday’s presidential debate.

But one senior member of the Prime Minister’s inner circle said Mr. Trump’s anti-free trade and protectionist rhetoric has been a topic of intense discussion among G7 and G20 finance ministers and among world leaders, who expect chaos in global markets if the Republican nominee were to win the Nov. 8 presidential election.

The senior official said one big Canadian worry is the impact of Mr. Trump’s promised protectionist measures including his pledge to tear up the North American free-trade agreement.

Liberal MP Wayne Easter, chairman of the House of Commons Finance Committee, said that the “official line from the government of Canada has to be that we will work with whomever is President.”

But Mr. Easter said Ottawa is well aware of the importance of trying to calm and stabilize global markets should Mr. Trump emerge victorious. The government is also doing its homework in closely examining the policy platforms of Mr. Trump and Ms. Clinton.

Mr. Easter said part of the Canadian strategy – in the event of a Trump victory – is to enlist the U.S. business community to explain to the New York real estate tycoon how supply chains have closely integrated the U.S and Canadian economies.

“If you try to tear up trade agreements like NAFTA, it’s going to impact thousands and thousands of jobs in both countries because they are all supply chains,” Mr. Easter said. He added there is an expectation in Ottawa that Mr. Trump’s advisers would be able to “moderate” the Republican nominee’s harsh protectionist views if he were elected.

Craig Alexander, chief economist at the Conference Board of Canada, said the Canadian government has every reason to be anxious about what a Trump presidency would mean for global economic stability.

“I don’t think there is any doubt that a Trump victory would be negatively, initially, responded to by financial markets because financial markets hate uncertainly,” he said. “If you look at the platform that Donald Trump has been running on, combined with the comments he makes, it creates a lot of uncertainty as to what policies would arise if he were actually in the White House.”

Mr. Alexander said Canada is highly dependent on a healthy trade relationship with the United States, where the vast majority of exports go. Any move to impose protectionist measures would impact Canada and Mexico but also weaken global growth, he said.

Scott Clark, a former deputy minister of finance who drew up contingency plans during the 1995 Quebec referendum, said it would be very difficult for the G20 to concretely prepare for a possible Trump victory.

“It’s hard to know how to co-ordinate. I don’t know what you can about do it, quite frankly,” Mr. Clark said. “The thought that that person could be president of the United States is pretty scary, but if it happens there is going to be one big headache the next day. Markets will go south. There is no doubt about it.”

Mr. Clark said it’s unlikely the G7 or G20 would call an emergency session and more likely world leaders would cross their fingers and hope that “reality would take over and he wouldn’t be as crazy as he is.”

The Trudeau cabinet also has concerns about Ms. Clinton, who has become more protectionist in response to the political mood of the U.S. electorate. Ms. Clinton has promised to appoint a trade prosecutor who would report directly to her if she is elected president.

Still, the Canadian government would much prefer dealing with Ms. Clinton, who has vast government experience and is considered more rational in policy making than Mr. Trump, an official said.

In a report issued in June, Capital Economics, an independent research group, warned that a Trump win would be very bad for Canada’s economy. “If he doesn’t push the U.S. economy into recession by slashing public spending, Canada’s exports might end up as collateral damage in his push to increase protectionism,” the report said.