Kurdish forces, known as pesh merga, and Iraqi government troops are part of the American-led coalition that has driven Islamic State militants from most of the territory they seized in 2014 in northern and western Iraq. The United States has supported both forces with military trainers, advisers, Special Operations forces, airstrikes and artillery.

But the coalition operation that evicted the militants from their last major urban stronghold in Iraq in the district of Hawija in Kirkuk Province on Oct. 5 narrowed the distance between pesh merga and Iraqi Army lines, raising tensions on both sides.

Defense Secretary Jim Mattis told reporters in Washington on Friday that with American troops “integrated among these forces,” he was concerned about an escalation to “a shooting situation.” But he said American forces were “working too, to make certain we keep any potential for conflict off the table.”

Col. Ryan Dillon, the spokesman for the coalition in Baghdad, said American troops remained focused on advising and training Iraqi forces. He said the coalition sought to avoid distractions from the current operation to evict ISIS militants in Iraq from their remaining territory in western Anbar Province near the Syrian border.

An official at the American Embassy in Baghdad urged all sides to avoid remarks or actions that might escalate tensions or distract from the fight against the Islamic State.

The two districts abandoned by pesh merga troops are south of Kirkuk, Kurdish commanders said. Both districts, Taza and Beshir, are inhabited by Turkmens, a Shiite Muslim minority, who oppose control of the area by Kurds, who are Sunni.

The districts are among several disputed areas in northern Iraq, including Kirkuk, seized by the pesh merga after Iraqi troops fled the 2014 assault by the Islamic State. The central government has demanded that the Kurdish regional government return all the territory.