The United States will cut off its supply of arms to Kurdish fighters in Syria, President Donald Trump told the Turkish president on Friday, in a move sure to please Turkey but further alienate Syrian Kurds who bore much of the fight against the Islamic State group.

In a phone call with Turkish President Recep Tayyip Erdogan, Trump said he’d “given clear instructions” that the Kurds will receive no more weapons — “and that this nonsense should have ended a long time ago,” said Turkish Foreign Minister Mevlut Cavusoglu.

The White House confirmed the move in a cryptic statement about the phone call that said Trump had informed the Turk of “pending adjustments to the military support provided to our partners on the ground in Syria.”

The White House called the move “consistent with our previous policy” and noted the recent fall of Raqqa, once the Islamic State group’s self-declared capital but recently liberated by a largely Kurdish force. The Trump administration announced in May it would start arming the Kurds in anticipation of the fight to retake Raqqa.

“We are progressing into a stabilization phase to ensure that ISIS cannot return,” the White House said, using an acronym for the extremist group.

The move could help ease strained tensions between the U.S. and Turkey, two NATO allies that have been sharply at odds about how best to wage the fight against IS. Turkey considers the Kurdish Syrian fighters, known by the initials YPG, to be terrorists because of their affiliation to outlawed Kurdish rebels that have waged a three decade-long insurgency in Turkey. Yet the U.S. chose to partner with the YPG in Syria anyway, arguing that the battle-hardened Kurds were the most effective fighting force available.

Cavusoglu, who said he was in the room with Erdogan during Trump’s call, quoted the U.S. president as saying he had given instructions to U.S. generals and to national security adviser H.R. McMaster that “no weapons would be issued.”

“Of course, we were very happy with this,” Cavusoglu said.

Yet for the Kurds, it was the latest demoralizing blow to their hopes for greater recognition in the region. Last month, the Kurds in neighboring Iraq saw their recent territorial gains erased by the Iraqi military, which seized the oil-rich city of Kirkuk and other disputed areas from the Kurdish regional government in retaliation for a Kurdish independence referendum that the U.S. ardently opposed.

Trump’s decision appeared to catch both the Pentagon and the U.S. State Department off guard. Officials at both agencies, who would normally be informed of changes in U.S. policy toward arming the Syrian Kurds, said they were unaware of any changes. The officials spoke on condition of anonymity.

It was unclear whether the Trump administration notified the Kurds of the move before telling the Turks. Nor was it how much significance the change would have on the ground, considering the fight against IS is almost over.

The United States has been arming the Kurds in their fight against IS through an umbrella group known as the Syrian Democratic Forces, or SDF, which is comprised of Kurdish as well as Arab fighters.

But the retreat of IS, which has lost nearly all its territory in Syria, has altered the dynamics in the region and a U.S. defense official said he was unaware of any additional arms scheduled to be transferred to the Kurds, even before the Turkish announcement.

Last week, Col. Ryan Dillon, the chief spokesman for the U.S. coalition that is fighting IS in Iraq and Syria, said there has yet to be any reduction in the number of U.S. advisers working with the SDF. His comments appeared to suggest the possibility that changes in the level and type of U.S. military support for the Syrian Kurds could be coming.

As the fight against IS has waned in recent months, the U.S. has pledged to carefully monitor the weapons it provides the Kurds, notably ensuring that they don’t wind up in the hands of Kurdish insurgents in Turkey known as the PKK.

Both Turkey and the U.S. consider the PKK a terrorist group. But the United States has tried to draw a distinction between the PKK and the Syrian Kurds across the border, while Turkey insists they’re essentially the same.

In both Syria and Iraq, the U.S. relied on Kurdish fighters to do much of the fighting against IS, but those efforts have yet to lead to a realization of the Kurds’ broader aspirations, most notably an independent state.

Washington’s support for the Syrian Kurds, in particular, has been a major thorn in U.S.-Turkish relations for several years, given Turkey’s concerns about the Kurds’ territorial aspirations. In particular, Turkey has feared the establishment of a contiguous, Kurdish-held canton in northern Syria that runs along the Turkish border.

Relations between NATO allies Turkey and the United States have also soured recently over a number of other issues, including Turkey’s crackdown on dissent following a failed coup attempt last year.

Ankara has also demanded that the U.S. extradite a Pennsylvania-based cleric that it blames for fomenting the coup, but the U.S. says Turkey lacks sufficient proof.

Lederman reported from Washington. Associated Press writers Robert Burns and Zeke Miller in Washington contributed to this report.