Iraq Government forces moved quickly on Monday to seize the contested city of Kirkuk in the north from Iraqi Kurdistan, where voters chose independence in late September.

With the defeat of the Islamic State in all its major positions in the north, the prospect of a clash between Baghdad and the Kurdish Regional Government — who were on the same side in the fight versus the Islamic State — has risen.

Last week Iraqi officials began to speak of an operation to take Kirkuk and nearby oilfields, in a contested area populated by Kurds, Turkmens, and Arabs. However, as late as Friday, Prime Minister Haider al-Abadi pushed back the reports as “fake news”: “[Our military] cannot and will not attack our citizens, whether Arab or Kurd.”

Over the weekend, emissaries from Baghdad conducted secret talks with Kurdish opposition forces to negotiate a withdrawal. Yesterday Iraqi forces — using US-supplied armored vehicles and equipment, similar to that provided by Washington to the Kurdish peshmerga — swept into the city of about 1 million people. They soon moved into an industrial district on the western edge, a power plant and refinery adjacent to the oilfields, and a military airport to the west.

Most peshmerga — notably those of one of Kurdistan’s two leading factions, the Patriotic Union of Kurdistan — stood down and left, but skirmishes with one Kurdish group linked to the Kurdistan Democratic Party killed almost 30 people and wounded dozens.

A Kurdish commander, Gen. Mohammed Raiger, said that his forces had mounted a counterattack about 15 miles west of the city and that reinforcements with “sophisticated weapons” had arrived. The Kurdish Regional Government’s security council said peshmerga fighters had destroyed five US-supplied Humvees and and would continue to resist them.

Hospitals in Kirkuk Province said 22 peshmerga and 7 Iraqi soldiers were killed. Wounded included 11 Kurdish fighters, four Iraqi soldiers, and 54 civilians.

Iraqi militia removing the flag of the Kurdish Regional Council:

Celebration for Some in Kirkuk, Flight for Others

Some Arab and Turkmen residents fired weapons into the air in celebration and cheered as Iraqi forces removed the Kurdish flag that had flown over the Kirkuk Governor’s compound, leaving the Iraqi flag mounted beside it. Iraqi troops ran over posters of KRG President Masoud Barzani, stood on images of the Kurdish flag, and posed in the Governor’s office, sitting in his chair.

Thousands of Kurdish residents left the city. Officials in Baghdad said Kirkuk Governor Najmaldin Karim had left for the Iraqi Kurdish capital Erbil.

The US-led coalition tried to portray clashes as “a misunderstanding” and “not deliberate as two elements tried to link up under limited visibility conditions” at night.

Spokesman Ryan Dillon, said US forces in the area were observing but were not involved in the fighting:

We are monitoring the situation closely and strongly urge all sides to avoid additional escalatory actions. We opposed violence from any party, and urge against destabilizing actions that distract from the fight against ISIS and further undermine Iraq’s stability.

On September 25, almost 93% of Kurdistan’s people supported independence in a 72% turnout. But the KRG has had to calculate its next move, with the ballot condemned by its neighbors, including Iran and Turkey, and the US.

The Kurdish authority is heavily dependent on revenue from the oil trade, half of it from the Kirkuk region.

Kurdish forces occupied Kirkuk, and nearby areas 2014 after Iraqi troops fled the sudden Islamic State offensive in June 2014 that captured Iraq’s second city Mosul, Tikrit, and parts of the north.