U.S. Vice President Mike Pence announced a five-day ceasefire in Syria Thursday following a more than four-hour meeting with Turkish President Recep Tayyip Erdogan at the presidential palace in Ankara.

After U.S. President Trump announced he would pull U.S. troops out of Kurdish-held sections of Syria, Turkey invaded, saying it wanted to establish a 20-mile buffer zone and push Kurdish fighters, who had been assisting U.S. troops against the Islamic State group, out of the area.

Pence told reporters Turkey agreed to pause its offensive for five days while the U.S. helps Kurdish fighters leave northeast Syria. After the Kurds withdraw, Turkish military operations would end entirely.

Trump responded on Twitter, calling the announcement “great news” and saying it would have been impossible had his administration not doled out “tough love.”

Earlier this week, Trump signed an executive order authorizing tough sanctions against Turkey

Pence’s trip comes just a week after the start of Turkey’s incursion. Secretary of State Mike Pompeo and national security adviser Robert O’Brien accompanied Pence.

The two countries “have both mutually committed to a peaceful resolution and future for the safe zone, working on an international basis to ensure that peace and security defines this border region of Syria,” Pence said, adding he has assurances from the Kurds that they would honor the deal. Turkey regards the Kurds as terrorists aligned with separatists within Turkey.

Pence said challenges remain but it sets conditions to prevent the Islamic State from rising again.

Trump sent his Turkish counterpart a letter last week, warning that the threatened sanctions could destroy the Turkish economy and advising him, “Don’t be a fool.” Media reports indicated Erdogan was so incensed, he threw the letter in the trash.

The U.S. House voted overwhelmingly Wednesday to approve a resolution condemning Trump’s troop withdrawal, and House Majority Leader Mitch McConnel said Thursday the resolution was not strong enough. Lawmakers worry the pullout will allow the Islamic State to rebuild.

“I’m sorry that we are where we are. I hope the vice president and the secretary of state can somehow repair the damage,” McConnell said.

For his part, Trump was dismissive of the situation Wednesday, saying a situation 7,000 miles away is not of concern to the U.S. and describing it as just “so much sand.” During a meeting with lawmakers later, he had what House Speaker Nancy Pelosi described a “meltdown” when reminded that the Sept. 11, 2001, terror attacks on New York and Washington were perpetrated by people from 7,000 miles away.