“The Turkish side will pause Operation Peace Spring in order to allow for the withdrawal of YPG forces from the safe zone for 120 hours,” Pence said at the U.S. ambassador’s residence in Ankara, referring to the name the Turkish government has used to describe its incursion. “All military operations under Operation Peace Spring will be paused and Operation Peace Spring will be halted entirely on completion of the withdrawal. Our administration has already been in contact with Syrian defense forces and we've already begun to facilitate their safe withdrawal from the nearly 20-mile-wide safe zone area south of the Turkish border in Syria.”

The agreement came after more than four hours of talks between Erdogan, Pence, Pompeo and other high-ranking U.S. officials. Ninety minutes of the negotiations were between Pence and Erdogan alone.

Speaking in Texas ahead of a political rally, President Trump hailed the deal as "an amazing outcome" that saved "millions and millions of lives."

"This is a situation where everybody is happy," he said. "The Kurds are very happy. Turkey is very happy. The United States is very happy. And, you know what? Civilization is very happy. It's a great thing for civilization."

From the outset, the mission had long odds: Pence and Pompeo landed in the Turkish capital on Thursday to the news that Erdogan had tossed a letter from Trump in the trash. Walking out of the ambassador's residence here en route to the presidential palace to meet with Erdogan, they wore stern looks and declined to take questions.

The ceasefire agreement salvages a foreign-policy fiasco in the making for the United States as it sought to halt an invasion that has killed civilians, driven America’s former Kurdish allies into the arms of Syrian strongman Bashar Assad and caused the release of hundreds of ISIS prisoners.

And it represents a political respite for President Trump, who had come under fierce criticism from Democrats and Republicans alike for seeming to abandon a vulnerable population the U.S. had sworn to protect.

Pence said the U.S. and Turkey had agreed to "coordinate efforts on detention facilities and internally displaced persons in formerly ISIS-controlled areas." The two countries also agreed "on the priority of respecting vulnerable human life, human rights and particularly the protection of religious and ethnic communities in the region," he said.

The U.S. side handed out a fact sheet laying out the terms of the agreement and reaffirming Turkey's good standing as a member of NATO and committing both countries to the territorial integrity of Syria.

Pompeo’s trip will also take him to Jerusalem for consultations with Israeli Prime Minister Benjamin Netanyahu and to Brussels for a meeting with NATO Secretary-General Jens Stoltenberg.

It comes as the secretary grows more deeply enmeshed in Democrats’ impeachment probe, with State Department staffers defying his orders to share their accounts of how the president’s personal lawyer Rudy Giuliani led a shadow foreign policy with Ukraine that cut out professional diplomats.

Abbey Marshall contributed.