WASHINGTON — No one should have been surprised, and yet it seems that everyone was. President Trump made clear long ago that he wanted to get out of the Middle East, but even some of his own supporters evidently assumed that he would not follow through or that someone would stop him.

As a result, the international crisis that many of his opponents feared for so long has finally arrived, but it is one of Mr. Trump’s own making and one that pits him against his own party and his own government. The Turkish assault on America’s Kurdish allies that he effectively facilitated reflects his foreign policy in its rawest Trumpian form.

It is a foreign policy built primarily on reflex and increasingly resistant to outside advice. Unimpressed by the national security establishment and uninterested in the tedium of traditional policymaking, Mr. Trump often demonstrates more faith in what some overseas strongman tells him than the soft-boiled guidance of the bureaucrats, diplomats, intelligence analysts and military officers in the Situation Room.

“This may be the riskiest national security decision that he’s made to this point,” said Richard Fontaine, the chief executive of the Center for a New American Security and a former aide to President George W. Bush. “I don’t know that we’ve learned anything new about the president’s decision-making style, but it does reveal the very significant risks that that style carries.”