BRUSSELS — America’s allies in Europe and Asia thought they had learned to digest and compensate for the instinctive unpredictability of President Trump. But the bitter resignation of Defense Secretary Jim Mattis and the abrupt announcement of plans to withdraw troops from Syria and Afghanistan are being viewed as watershed moments for Washington’s relations with the world.

Many countries were already trying to recalibrate their relations with Mr. Trump, who views traditional allies as competitors. From South Korea to Japan, France to Germany and other countries in the NATO alliance, senior officials have been talking aloud about how to do more on their own and ways to be less reliant on a Washington focused on “America First.”

But they also had faith in Mr. Mattis, who presented himself as a man of continuity and of traditional alliances, and who worked to strengthen them considerably regardless of the views held in the White House. He was also regarded by traditional allies as their most sympathetic and effective conduit to Mr. Trump, and as the “adult” of last resort able to restrain, balance or ignore the whims of an unpredictable president.

This is “a morning of alarm in Europe,” Carl Bildt, a former prime minister of Sweden, said on Twitter on Friday. He added that Mr. Mattis was seen as the last “strong bond across the Atlantic in the Trump Administration,” since “all the others are fragile at best or broken at worst.”