Turkey will delay a planned offensive against Kurdish forces in northeastern Syria, President Recep Tayyip Erdogan said Friday, citing talks with the U.S. president and other officials after the administration’s decision this week to withdraw all U.S. troops from the country.

Erdogan, who had threatened an imminent military operation in areas where U.S. forces are present, said that he welcomed President Trump’s decision to pull out of Syria, where about 2,000 U.S. troops are partnered with Kurdish-led fighters battling the Islamic State.

“We welcome those statements with pleasure and an equal amount of caution,” he said of Trump’s announcement Wednesday, adding that an operation would take place “in the coming months.”

“Our phone call with President Trump, along with contacts between our diplomats and security officials and statements by the United States, have led us to wait a little longer” before launching the offensive, he said.

He also said that Turkey will have the right to move against “terrorists” in northern Syria after one month, which “we think is enough [time] for the U.S. to withdraw,” Turkey’s state broadcaster reported.

Turkey sees Kurdish fighters both at home and in Syria as a threat to its national security — and the U.S. alliance with Kurdish forces, supported by the United States as effective fighters against the Islamic State, has long angered Turkish officials.

Turkey and the United States are officially NATO allies, but relations have deteriorated sharply over the course of the Syrian war.

The two sides narrowly avoided a military confrontation earlier this year in the northern Syrian city, Manbij, where U.S. troops were stationed with Kurdish-led fighters after having ousted the Islamic State.

Turkey and the United States are now conducting joint patrols in the area around Manbij, but Turkey has been frustrated with the progress and wants to see all Kurdish fighters routed from the border areas.

Turkey shares a 500-mile-long frontier with Syria and wants to prevent Kurdish militias from using the region to launch attacks inside Turkish territory. Turkish forces have fought a decades-long war with the Kurdistan Workers’ Party, or PKK, inside Turkey. The PKK and its Syrian affiliate, known as the People’s Protection Units, or YPG, have strong ideological and operational links.

But while Erdogan vowed Friday to “cleanse” northeastern Syria of both the YPG and Islamic State remnants, his plan to delay the operation appeared, at least for now, to head off a potentially disastrous assault on one of the most volatile areas of Syria.

There, Kurdish-led fighters, Iranian-backed militias and U.S. troops operate in proximity. The region, east of the Euphrates River, is also home to lucrative oil fields and borders Iraq.

It has been devastated by years of conflict, including a recent U.S.-backed offensive against the Islamic State in Raqqa. That operation destroyed much of the northern Syrian city, little of which has been rebuilt, and tens of thousands of displaced Syrians live in camps in the surrounding areas.

A Turkish military operation would have put U.S. forces in the line of fire, potentially setting off an even wider conflagration.

Earlier this month, before Trump’s decision, the Pentagon called any unilateral Turkish action in northeast Syria “unacceptable.”

U.S. advisers had planned to train a 40,000-strong police force to stabilize key areas in northeastern Syria. The Islamic State has lost the vast majority of territory once under its control, but it has not yet been defeated and could make a comeback, analysts say.

What remains of the Islamist militant group’s fighting force is now pinned down in a group of villages on the eastern bank of the Euphrates, after the militants lost control of their final urban stronghold in Hajin.

Mustafa Bali, a spokesman for the Kurdish-led Syrian Democratic Forces, said Friday that the militants have stepped up attacks since Trump’s announcement Wednesday, springing from tunnels in guerrilla-style ambushes and striking SDF fighters with car bombs.

“We think that their morale was raised by the U.S. decision and that there will be more attacks in future,” Bali said. “They will try to activate their sleeping cells in the liberated areas.”

Loveluck reported from Beirut.