KIRKUK, Iraq -- Two weeks after fighting together against the Islamic State, Iraqi forces pushed their Kurdish allies out of the disputed city of Kirkuk on Monday, seizing oil fields and other facilities amid soaring tensions over last month's Kurdish vote for independence.

The move by the Iraqi military and its allied militias so soon after neutralizing the Islamic State in northern Iraq hinted at a country that could once again turn on itself after disposing of a common enemy.

Civilians and federal troops pulled down Kurdish flags around the city. Kurdish Gov. Najmaddin Karim, who had stayed at his post despite being dismissed by Baghdad weeks ago, fled to Irbil, the capital of Iraq's autonomous Kurdish zone.

Revelers waving Iraq's national flag and the flag of its Turkmen minority flooded central Kirkuk in an evening celebration. But it was the Shiite sectarian chants heard above the din of the rally that underscored the coming political battles between Iraq and its Kurdish region.

Iraqi forces were supported -- as they always are now in major operations -- by the country's Popular Mobilization Forces, a predominantly Shiite militia coalition that the Kurds see as an instrument of Iranian policy.

In their bid to keep Kirkuk and its oil-rich countryside, Kurdish leaders whipped up fears that the central government in Baghdad is dominated by Tehran and would oppress Kurds if they recaptured the ethnically mixed city.

Their fears were further affirmed after Iran came out forcefully against the Kurdish region's nonbinding referendum for independence on Sept. 25 and then closed its official crossings to the region on Sunday.

Iraq's Kurds, too, remember the brutal campaigns waged by Saddam Hussein, himself an enemy of Tehran, against the minority, including a poison gas attack on the town of Halabja in 1988 that killed thousands.

As Arab and Turkmen revelers celebrated the change of power in Kirkuk, thousands of Kurdish residents, fearful of federal and militia rule, packed the roads north to Irbil.

But Baghdad was eyeing its Kurdish partners warily as well. Prime Minister Haidar al-Abadi said he was reclaiming a city that was never within the legal boundaries of the Kurdish autonomous region.

When Iraq's armed forces crumbled in the face of an advance by Islamic State group in 2014, Kurdish forces moved into Kirkuk to secure the city and its surrounding oil wells. The city is 32 kilometres (20 miles) outside the Kurds' autonomous region in northeast Iraq.

Baghdad insisted the city and its province be returned, but matters came to a head when the Kurdish authorities expanded their referendum to include Kirkuk. To the Iraqi central government, that looked like a provocation that underscored what it sees as unchecked Kurdish expansionism. The city of more than 1 million is home to a mix of Arabs, Kurds and Turkmen, as well as Christians and Sunni and Shiite Muslims.

Kurdish officials accused the Iraqi army of carrying out a "major, multiprong attack," and reported heavy clashes on Kirkuk's outskirts, but a spokesman for Iraq's state-backed militias said they were met by little resistance.

By midday, federal forces had moved into several major oil fields north of the city, as well as its airport and an important military base, according to Iraqi commanders. Kurdish party headquarters inside Kirkuk had been abandoned.

The U.S., which has armed, trained and provided vital air support to both sides in their shared struggle against the Islamic State group, described Monday's events as "co-ordinated movements, not attacks," while bemoaning the dispute as a distraction against a common enemy. It said the limited exchange of fire was a "misunderstanding."

After initial reports of clashes in and around the city, it appeared by afternoon as though the vastly outnumbered Kurdish forces, known as the peshmerga, were pulling out with hardly a fight.

Local police stayed in place in Kirkuk as al-Abadi urged civil servants to remain at their posts. "We have only acted to fulfil our constitutional duty and extend the federal authority and impose security and protect the national wealth in this city," he said.

Brig. Gen. Bahzad Ahmed, a spokesman for Kurdish forces, said federal forces seized an oil and gas company and other industrial areas south of Kirkuk in fighting with Kurdish forces that caused "lots of casualties," without providing a number.

He said Iraqi forces have "burnt lots of houses and killed many people" south of the disputed city. His claims could not be independently verified.

A spokesman for Iraq's state-sanctioned militias said they had "achieved all our goals" in retaking areas from Kurdish forces in and around the city. Ahmed al-Assadi said federal forces came under fire from "some rebels" after launching the operation early Monday and returned fire. He did not say whether they suffered any casualties.

He said federal forces were deployed in the area of the K-1 military base, the Kirkuk airport and a number of oil fields and installations. The Iraqi military said it seized two major oil fields outside the city.

Al-Assadi said the Popular Mobilization Forces have not entered central Kirkuk, but Associated Press reporters saw Turkmen PMF militiamen taking up posts in the western part of the city.

Tensions have risen since the Kurdish referendum on independence from Iraq. The central government, along with neighbouring Turkey and Iran, as well as the United States, rejected the vote.

The central government and the autonomous Kurdish region have long been at odds over sharing oil revenue and the fate of disputed territories like Kirkuk that are controlled by Kurdish forces but outside the self-ruled region.

Al-Abadi has said the militias will remain outside the city.

Baghdad has been increasing pressure on the region since the referendum, pushing Kurdish leaders to disavow the vote and accept shared administration over Kirkuk.

Al-Abadi's Cabinet said Sunday that fighters from Turkey's Kurdish insurgency, the PKK, were beginning to appear in Kirkuk, and he declared that would be tantamount to an act of war.

------

Issa reported from Baghdad. Associated Press writer Emad Matti in Kirkuk, Iraq, contributed.