The Syrian Kurdish YPG militia says its military advisers will withdraw from the northern Syrian city of Manbij, after the United States and Turkey agreed on a road map to resolve the future of the city, an issue that is a major source of tension between the NATO allies.

The agreement to ensure security and stability in Manbij came during a meeting Monday in Washington between U.S. Secretary of State Mike Pompeo and Turkish Foreign Minister Mevlut Cavusoglu.

The U.S. State Department did not provide further details about the agreement, but a senior official said Tuesday, “We will continue to be there. We hope Turkey can help patrol,” while declining to specify how many troops would remain.

The official added: “We want locally rooted forces to continue to support stability.”

Monday, Cavusoglu told Turkish journalists in Washington that U.S.-backed Kurdish fighters will withdraw from Manbij under a plan that could be implemented within six months.He said U.S. and Turkish officials would temporarily ensure security in Manbij.

“The aim of this road map is the clearing of Manbij of all terror organizations and the permanent instatement (establishment) of safety and stability,” Cavusoglu said.

Washington’s support of the Syrian Kurdish YPG militia in the war against the Islamic State group has angered Turkey. Ankara calls the YPG terrorists, accusing the militia of being linked to a Kurdish insurgency inside Turkey.

Ahead of Cavusoglu’s visit to Washington, the Turkish foreign minister said, “[The United States] has preferred to collaborate with a terrorist organization in Syria.That was a grave mistake, and we are trying to change their position.”

The Syrian town of Manbij was seized from Islamic State by mainly YPG forces.Ankara has claimed Washington reneged on an agreement the militia would withdraw after taking Manbij.

Former U.S. ambassador to Turkey James Jeffrey told VOA’s Turkish Service that although there are problems between the United States and Turkey, the ties between the countries would not break down.

“Because the U.S. and Turkey share basic interests — we are status quo powers, we are both major beneficiaries of the global order, and we see in similar terms a threat to that order in the region around Turkey, from Russia, from Iran and from extremist elements — the relationship will remain extremely important and will not break down.”

He acknowledged, “The relationship will also be fraught with problems because it is very complicated.”

Jeffrey said the most difficult problem between two countries is Turkey’s agreement to buy the S-400 anti-aircraft missile system from Russia, a non-NATO country.

Turkey’s move to buy the surface-to-air missile system, which is incompatible with NATO systems, has unnerved NATO member countries.In response, a U.S. Senate committee has threatened to prevent Turkey from purchasing U.S. Lockheed Martin F-35 fighter jets.