After an hours-long meeting, Vice President Mike Pence announced on Thursday afternoon that Turkish President Recep Tayyip Erdogan has agreed to a ceasefire in northern Syria.

The vice president said Turkey would pause its invasion for 120 hours in order to allow Kurdish allies to withdraw from the safe zone of the border region. Pence said the leaders committed to defeating ISIS and renewed an agreement to "coordinate efforts on detention facilities and internally displaced persons in formerly ISIS-controlled areas."

The U.S. agreed not to put new sanctions in place and to end the current sanctions if the ceasefire holds.

Get Breaking News Delivered to Your Inbox

Pence traveled to Turkey, along with Secretary of State Mike Pompeo, after Erdogan refused U.S. calls for a ceasefire, even after the Trump administration had placed new economic sanctions on the country.

The invasion began October 9, shortly after President Trump announced a drawdown of U.S. troops from outposts in northern Syria, where they had been working with the Kurds to defeat ISIS. Shortly before the invasion began, Mr. Trump wrote to Erdogan to urge him against his planned incursion, but reports said that Erdogan tossed the letter from Mr. Trump in the trash.

Pence said Erdogan also agreed to engage in no military action against the Kurdish community of Kobani, in order to respect human rights and to protect ethnic and religious communities.

Although the U.S. will not have troops in the region, Pence said it "will continue to engage diplomatically."

When Mr. Trump arrived in Texas, he praised the ceasefire, telling reporters "we've gotten everything we ever dreamed of" and the Kurds are "incredibly happy" with this. He also declared it a great day for the United States, a great day for Turkey and a great day for the Kurds and for civilization.

Mr. Trump said the ceasefire "was something that they've been trying to get for 10 years."

"You would have lost millions and millions of lives. They couldn't get it without a little 'rough love,' as I called it. I just put out — they needed a little bit of that at the beginning," Mr. Trump said. "And then everybody said, 'Wow, this is tougher than we thought.' When those guns start shooting, they tend to do things."

The president also thanked Turkey for the ceasefire, even though Turkey is responsible for the incursion.

"It's a great day for the United States. It's a great day for Turkey," the president said. "It's a great day for our partners who have really worked. I mean a lot of people question some of them. I'm not questioning anybody. They really did. The Kurds were great. Great day for the Kurds. It's really a great day for civilization. It's a great day for civilization. So I just want to thank everybody."

The White House disclosed on Wednesday that Mr. Trump had both cajoled and threatened Erdogan in an unusual letter last week, urging him to act only in "the right and humane way" in Syria. Mr. Trump started on a positive note by suggesting they "work out a good deal," but then talked about crippling economic sanctions and concluded that the world "will look upon you forever as the devil if good things don't happen. Don't be a tough guy. Don't be a fool!"

On Wednesday, Mr. Trump said that the U.S. has no stake in defending Kurdish fighters who died by the thousands as America's partners against Islamic State extremists.

And he suggested that another Kurdish group posed a greater terror threat than Islamic State terrorists. He welcomed the efforts of Russia and the Assad government to fill the void left after he ordered the removal of nearly all U.S. troops from Syria amid a Turkish assault on the Kurds.

"Syria may have some help with Russia, and that's fine," Mr. Trump said. "They've got a lot of sand over there. So, there's a lot of sand that they can play with." He added, "Let them fight their own wars."

The split-screen foreign policy moment proved difficult to reconcile and came during perhaps the darkest moment for the modern U.S.-Turkey relationship and a time of trial for Mr. Trump and his Republican Party allies. Severe condemnation of Mr. Trump's failure to deter Erdogan's assault on the Kurds and his subsequent embrace of Turkish talking points about the former U.S. allies sparked bipartisan outrage in the U.S. and calls for swift punishment of the NATO ally.

Republicans and Democrats in the House, bitterly divided over the Trump impeachment inquiry, banded together for an overwhelming 354-60 denunciation of the U.S. troop withdrawal, with 129 Republicans joining all of the Democrats in the vote on resolution. Many lawmakers expressed worry that the withdrawal could lead to revival of the Islamic State group as well as greater Russian influence and presence in the area, besides the slaughter of many Kurds.

Senate Majority Leader Mitch McConnell publicly broke with Mr. Trump to praise the U.S. relationship with the Kurds as "a great alliance," in opposition to the president's remark that they were "no angels."

Republican Senator Lindsey Graham, who meets often with the president and is one of his strongest and most important supporters in Congress, called the U.S. withdrawal the worst decision of Mr. Trump's presidency.

"To those who think the Mideast doesn't matter to America, remember 9/11 — we had that same attitude on 9/10/2001," Graham said

In public appearances, Mr. Trump argued he was fulfilling a campaign promise to bring U.S. troops home from "endless wars" in the Middle East, casting aside criticism that a sudden U.S. withdrawal from Syria betrays the Kurdish fighters, stains U.S. credibility around the world and opens an important region to Russia and Iran.

"We have a situation where Turkey is taking land from Syria. Syria's not happy about it. Let them work it out," Mr. Trump said. "They have a problem at a border. It's not our border. We shouldn't be losing lives over it."

Turkish troops and Turkish-backed Syrian fighters launched their offensive against Kurdish forces in northern Syria a week ago, two days after Mr. Trump suddenly announced he was withdrawing the U.S. from the area. Erdogan has said he wants to create a "safe zone" 30 kilometers deep in Syria.

Ankara has long argued the Kurdish fighters are nothing more than an extension of the Kurdistan Workers Party, or PKK, which has waged a guerrilla campaign inside Turkey since the 1980s and which Turkey, as well as the U.S. and European Union, designate as a terrorist organization.

Kathryn Watson, Grace Segers and Caroline Cournoyer contributed to this report.