The Turks, meanwhile, are NATO allies, bound to Washington in a formal defense pact. Incirlik Air Base, a major staging point for American military operations throughout the Middle East, is in southern Turkey.

Mr. Bolton, a conservative hard-liner with considerable self-regard, can be a hard person to feel sympathy toward. He has made his own serious errors, not least his aggressive support for the 2003 Iraq War, which destabilized the Middle East, and, more recently, his creation of a White House decision-making system that limits robust discussion.

He certainly knew before taking the position as Mr. Trump’s national security adviser that he would be serving a chaos-driven and temperamental master. Still, Mr. Bolton faces the unenviable challenge of regularly having to defend the indefensible or make corrections after the fact. In October, he flew to Moscow to explain to President Vladimir Putin Mr. Trump’s sudden and ill-advised decision to begin pulling out of the 1987 Intermediate-Range Nuclear Forces Treaty, negotiated by Ronald Reagan and Mikhail Gorbachev.

Mr. Bolton’s latest Middle East visit was intended to reassure anxious regional leaders that the American withdrawal from Syria would be orderly. But the mission ran aground after Mr. Bolton demanded that Turkey protect Washington’s Kurdish allies and pledged that American forces would remain in Syria until the Islamic State was defeated, which could take months or years. That seemed to contradict Mr. Trump’s pronouncement in December that the Islamic State had been defeated and all 2,000 American troops would be out of Syria within 30 days.

Cue Mr. Erdogan, who dismissed Mr. Bolton’s remarks as a “grave mistake” and said, “It is not possible for us to swallow the message Bolton gave from Israel.” A pro-government newspaper went so far as to accuse Mr. Bolton of being part of a “soft coup against Trump.”