OTTAWA -- To hear Pierre Alarie tell it, Mexico and Canada are like two weary travellers seeking shelter from the same storm -- the fierce bluster from Donald Trump's frequent criticism of the North American Free Trade Agreement.

The two nations will be better able to withstand that storm if they stand together, the Canadian ambassador to Mexico declared last month during a speech to a business gathering in that country's capital city.

Alarie's message, Mexican and Canadian officials say, reflects a deep level of co-operation between the two countries -- something that, given the challenging three-way dynamics of North American politics, hasn't always been the case in the past.

It may not be the case in the future, either.

If push comes to shove, some observers warn, Canada will have to jettison Mexico and pursue its own bilateral side deal with the U.S. if the NAFTA talks degenerate.

A strong, newly negotiated three-way NAFTA is the goal, said Maryscott Greenwood, head of the Canadian American Business Council. But strained relations between Trump and Mexico could well make that difficult, she acknowledged.

"If it's politically impossible ... for the U.S. to move forward with a comprehensive economic relationship with Mexico for various reasons -- Mexican politics, U.S. politics -- then we think, 'Don't be delayed by that; move forward with a bilateral negotiation,"' Greenwood recently told the House of Commons foreign affairs committee.

"If we can't have trilateral, certainly we should move forward on a new agreement with Canada and the United States. We think it's doable and possible."

Not surprisingly, Mexico's political leaders, like Tourism Minister Enrique de la Madrid Cordero, warn against abandoning NAFTA's unique three-way nature.

Canada and Mexico should be working together to modernize the 23-year-old trade deal, not settling for a series of bilateral side deals where one country throws the other under the bus to serve its own interests, he said.

To that end, Canada and Mexico need to talk directly, to strengthen their relations in the face of U.S. uncertainty, de la Madrid Cordero said in a recent interview.

"There's a three-way conversation that will always take place and should take place. But at the same time we should start to have an even more constructive relationship talking directly among ourselves because we share similar challenges," he said.

"We should learn to have a relationship that is not always dependent and does not only go through the U.S."

Laura Macdonald, a Canada-Mexico expert at Carleton University, said Mexico and Canada have a checkered history of co-operation that dates back a quarter of a century.

"Mexico and Canada have not co-operated very well in the past. Originally, the Canadian government wasn't thrilled about Mexico being part of the NAFTA agreement," Macdonald said.

The two countries have grown closer over the years, but other irritants have arisen, notably the visa requirement that Stephen Harper's Conservative government imposed on Mexican travellers in 2009.

It was lifted last year by the Liberals; Prime Minister Justin Trudeau's subsequent efforts to repair relations have brought the two countries closer together at an opportune time, Macdonald said.

Officials from either side of the Canada-Mexico divide, speaking on condition of anonymity in order to discuss matters of diplomatic sensitivity, say the lines of communication between the two countries are always open.

A Canadian official says Trudeau's efforts at a Mexican rapprochement prior to Trump's electoral win last November certainly hasn't hurt, leading to open channels of communication that have become a critical tool in the Trump era.

The official's Mexican counterpart cited "constant communication" between cabinet ministers in the two governments, and that conversations are ongoing in foreign affairs, economics, the environment and security -- not just when Trump "blurts" something out.

Duncan Wood, director of the Mexico Institute at the Wilson Centre in Washington, D.C., said Mexicans have become hardwired to believe they are on their own in fending for their interests in North America, regardless of friendly overtures by Canada.

All that changed, he said, when Trump recently blasted Canadian dairy, lumber and energy. After Mexico endured so many vitriolic Trump attacks, it "saw an opportunity there and immediately expressed support for Canada."

With Mexico's next presidential election set for the summer of 2018, the clock is ticking against any comprehensive renegotiation of NAFTA, but there could be some significant amendments such as in e-commerce, Wood suggested.

The key, he said, is for all three countries to do some advance talking on what can be achieved during what will likely be a short three-month window for talks at the end of 2017.

Wood added one caution: as they continue their dialogue, Canada and Mexico need to tread carefully.

"You don't want it to seem like you're ganging up on the United States," he said. "Effective co-ordination between the three nations ahead of time is valuable."