which has trained and equipped the advancing Iraqi troops, which include elite counterterrorism forces, and the Kurdish peshmerga on the other side.

But the Iraqi side is also backed up by Shiite militia forces close to Iran, at a time when the Trump administration has been vocal about curbing Iranian influence in the region, having sanctioned Iran's Islamic Revolutionary Guard Corps last week.

Iraqi forces said they were under instructions to avoid violence, but Kirkuk residents said that gunfire and explosions could be heard in the city in the early hours of the morning. Kurdish media reported that thousands of Kurdish volunteer fighters had rushed to take up arms.

Iraqi Prime Minister Haider al-Abadi had ordered his forces to "protect all citizens" as they retake positions, state television reported.

Kurdish forces tookfull control of the ethnically and religiously mixed city of Kirkuk after the Iraqi military fled from large swaths of northern Iraq in 2014 in the face of an Islamic State push. It also seized oil fields formerly run by Baghdad that pump hundreds of thousands of barrels of oil per day. Now Iraq wants that ground back.

Army, police and forces from Iraq's popular mobilization units, which include the Iran-backed militias, have massed in the area, as Kurdish forces furiously dug defenses. Humvees and firing positions protected by sandbags were stationed on the main highway from Baghdad to Kirkuk. Bulldozers dragged earth to the road to build blockades to stop armored convoys from advancing. Bridges were blocked.

As Kurdish authorities warned they were about attack, Abadi tried to defuse