The U.S. military is shifting its stance in Syria, Defense Secretary Jim Mattis said Friday, as the program to arm the Kurdish opposition comes to a close and is replaced by increased support to local police and security forces.

Mattis said the Pentagon is “changing the composition of our forces” in Syria to reflect the collapse of the Islamic State group there and a renewed emphasis on finding a diplomatic path to peace.

Speaking to reporters on his plane at the start of a five-day trip to the Middle East, Mattis said the shift in American forces will support the diplomatic process.

His comments came on the heels of the announcement last week that the U.S. would stop actively providing arms to Syrian Kurds, known as the YPG. Officials have acknowledged that the U.S. will likely begin taking back large military vehicles and heavy weapons from the Kurds, now that major combat operations to retake Raqqa from the Islamic State group are over.

Fighters of Syrian Democratic Forces inspect the bunker of the Islamic State militants under the stadium in Raqqa, Syria Oct. 18, 2017.

​It’s not clear, however, whether the move to provide arms has completely stopped already, or is in the process of ending.

As part of the changing U.S. military role, an artillery unit of about 400 Marines is leaving Syria this week, taking their howitzers with them.

Their exodus still leaves well more than 1,000 U.S. troops in the country. Although the Pentagon will only publicly acknowledge about 500 U.S. forces in Syria, there were at least 1,700 there throughout much of the year as the battle for Raqqa raged on.

“The YPG is armed and as the coalition stops operations, then obviously you don’t need that, you need security forces, you need police forces,” said Mattis. “That's local forces, that’s people who make certain that ISIS doesn’t come back.”

The U.S. program to arm the Kurds has been a sharply divisive issue with Turkey, which views them as terrorists because of their affiliation to outlawed Kurdish rebels who have waged a three decade-long insurgency in Turkey.

U.S. commanders have consistently argued that the battle-hardened Kurds were the most effective fighting force available.

​In a phone call last week with Turkish President Recep Tayyip Erdogan, President Donald Trump said he’d “given clear instructions” that the Kurds will receive no more weapons, according to 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.”

U.S. officials have been careful in their description of what exactly is happening, leaving open the possibility that some weapons, such as smaller arms, will remain with the Kurdish fighters in case IS tries to make a comeback.