ISTANBUL — The United States and Turkey agreed Monday on a plan to withdraw Kurdish fighters from the northern Syrian city of Manbij as a step toward resolving one of the tensest disputes to erupt recently between the countries.

Secretary of State Mike Pompeo and Turkey’s foreign minister, Mevlut Cavusoglu, “endorsed a road map” to “ensure security and stability in Manbij,” according to a State Department statement issued after the two officials met in Washington on Monday.

Neither side released details of the plan, but Turkish and American officials confirmed that it called for the withdrawal of Kurdish forces from the city. The agreement hands a significant gain to President Recep Tayyip Erdogan of Turkey just weeks ahead of presidential elections.

Turkish officials said the road map calls for the Kurdish militia in Manbij — the People’s Protection Units — as well as Kurdish commanders and political leaders to withdraw from the town and be replaced by local leaders. They also said that the plan called for Turkish and American forces to jointly oversee stabilization operations in the area.