And Mr. Assad, who was barely clinging to power after the Arab Spring in 2011, and whose military facilities Mr. Trump bombed in the opening months of his presidency in 2017, has a new lease on life. The Americans are gone from the one corner of his country they once occupied.

Mr. Trump has a different view — no surprise, given the bipartisan critique of his failure to stop Mr. Erdogan during their phone conversation, or threaten sanctions before the invasion, rather than after the facts had changed on the ground.

“I’m happy to report tremendous success with respect to Turkey,” Mr. Trump told reporters after his vice president and secretary of state announced the deal. “This is an amazing outcome. This is an outcome, regardless of how the press would like to damp it down, this was something they were trying to get for 10 years.”

Mr. Trump’s joy may reflect a very different worldview than that of his military, his diplomats or the Republican leaders who say he has damaged America’s reputation and influence. While his party, and Democrats, accused him of betraying allies and aiding Russia, Mr. Trump insisted he was simply making good on a campaign promise to bring troops home from “endless wars.”

On Wednesday, as Mr. Pence and Mr. Pompeo were flying to Ankara, Speaker Nancy Pelosi was challenging the president on whether there was any strategic logic to his withdrawal from Syria — especially if it resulted in freeing detained ISIS fighters who might now attack in the region or on the United States.

On Thursday, recounting her heated discussion with the president at the White House the previous day, she said she asked him how his strategy fit with his announcement last Friday that nearly 3,000 more troops were being deployed to Saudi Arabia. The president responded that the Saudis were paying the cost of that deployment — suggesting that Mr. Trump was happy to commit troops to the highest bidder among American allies, rather than make an independent judgment about their strategic importance.

Republicans also challenged the agreement reached in Ankara.

“The announcement today is being portrayed as a victory. It is far from a victory,” Senator Mitt Romney, Republican of Utah, said on the Senate floor Thursday. “Given the initial details of the cease-fire agreement, the administration must also explain what America’s future role will be in the region, what happens now to the Kurds and why Turkey will face no apparent consequences.”