U.S. Defense Secretary Jim Mattis' decision to resign creates a void for Canada, says former Defence Minister Peter MacKay, because of Mattis's deep understanding of Canada's role in joint NATO and UN missions and good ties with Canadian security officials.

His years of experience in the U.S. military and on-the-ground understanding of the parts of the world where he served as a Marine general, particularly in Iraq and Afghanistan, are "virtually irreplaceable," MacKay said.

After serving for two years at the top of the U.S. military machine, Mattis announced Thursday that he'd resign as of the end of February, in a move widely seen as a rebuke of Trump's decision to abrupt withdraw U.S. troops from Syria.

The retired general has been considered a moderating influence on Trump over his last two years as Pentagon chief, which is why concerns have been raised by ally nations about how his departure could affect U.S. security and foreign policy.

These concerns are particularly focused on America's role in the NATO transatlantic alliance after Trump said this week that not only will the U.S. military pull out of Syria, but the number of U.S. troops will also be cut in half in Afghanistan, where the U.S. is part of the NATO-led joint mission Operation Resolute Support.

"In spite of the moniker 'Mad Dog Mattis' he was anything but. He was a highly intelligent, highly rational guy and he saw first-hand the integration of defence, diplomacy, development that Canada was doing and was very full of praise and admiration for that," MacKay said.

Mattis's departure is even more keenly felt in light of the departures of H.R. McMaster and John Kelly, who U.S. President Donald Trump also appointed to serve in his administration, MacKay added. McMaster was an army general who was Trump's national-security adviser for a year; Kelly is a retired Marine general who served as secretary of homeland security and then Trump's chief of staff.

McMaster resigned last April; Kelly is to leave the White House at the end of this year.

"Jim Mattis and the others have and feel an abiding respect for Canada and our role in NATO and in NORAD, for our niche capabilities, what we were able to do along with others in the coalition, both the UN and NATO coalition in Afghanistan, our support role in other missions," MacKay said. "That, too, is in some jeopardy depending on who replaces Gen. Mattis."

But in spite of ongoing political tensions at the top, Canada's defence and security relationship with the U.S. is hardwired at the bureaucratic and institutional levels and has not materially changed with the election of Donald Trump, said Fen Hampson, director of the global security and politics program at the Centre for International Governance Innovation.

Mattis' resignation will not alter those ties, he said.

"There's a constant flow of exchanges and communication on, I would say, almost an hourly basis. That's not really going to change in substantive terms," Hampson said.

"I think where it's going to be probably felt most keenly is at the cabinet-to-cabinet level where our officials have met with Mattis and (Secretary of State Mike) Pompeo on a pretty regular basis and that's where the hole is going to be felt."

Dave Perry, a senior defence analyst with the Canadian Global Affairs Institute, echoed this, saying he has heard of little change on the ground when it comes to the day-to-day bilateral work and partnerships between Canadian and American officials.

"It's a relationship that's pretty embedded at the working level in institutional agreements, exchanges, all the Canadians that work directly within the U.S. defence structure in the United States — so I think the degree of change has probably been overstated with this administration," he said. "A lot of things on the defence front have continued to work quite well quietly and will likely do so in the future."

While many analysts agree that Canada should be concerned about losing an ally in the Trump administration like Mattis, who acted as a stabilizer at the highest levels, this concern could be eased depending on whom Trump nominates as his replacement.

"The void now, within the defence and security world, will hopefully be filled with someone of his ilk and his acumen," MacKay said of Mattis. "Hope burns eternal. I remain very optimistic about the resilience of the Canada-U.S. relationship. It'll survive this administration, but boy, there's a lot of damage being done."