Iraqi government forces captured the Kurdish-held city of Kirkuk on Monday, responding to a Kurdish vote on independence with a bold lightning strike that transforms the balance of power in the country.

A convoy of armoured vehicles from Iraq's elite U.S.-trained Counter-Terrorism Force seized the provincial government headquarters in the centre of Kirkuk on Monday afternoon, residents said, less than a day after the operation began.

A dozen armoured vehicles arrived at the building and took up positions nearby alongside local police, residents said. They pulled down the Kurdish flag and left the Iraqi flag flying.

Prime Minister Haidar al-Abadi ordered that the Iraqi flag be hoisted over Kirkuk and other disputed areas claimed by both the central government and the Kurds, who defied Baghdad to hold a vote for independence on Sept. 25.

Baghdad described the advance as largely unopposed, and urged the Kurdish security forces known as Peshmerga to cooperate in keeping the peace. The Peshmerga said Baghdad would be made to pay "a heavy price" for triggering "war on the Kurdistan people."

Washington called for calm on both sides, seeking to avert an all-out conflict between Baghdad and the Kurds that would open a whole new front in Iraq's 14-year-old civil war and potentially draw in regional powers such as Turkey and Iran.

A resident inside Kirkuk said members of the ethnic Turkmen community in the city of 1 million people were celebrating, driving in convoys with Iraqi flags and firing shots in the air. Residents feared this could lead to clashes with Kurds.

The overnight advance was the most decisive step Baghdad has taken yet to block the independence bid of the Kurds, who have governed an autonomous part of Iraq since the fall of Saddam Hussein in 2003 and voted three weeks ago to secede.

Kirkuk, one of the most ethnically and religiously diverse cities in Iraq, is located just outside the autonomous Kurdish zone. Kurds consider it the heart of their homeland and say it was cleansed of Kurds and settled with Arabs under Saddam to secure control of the oil that was the source of Iraq's wealth.

State TV said Iraqi forces had also entered Tuz Khurmato, a flashpoint town where there had been clashes between Kurds and mainly Shi'ite Muslims of Turkmen ethnicity.

The "government of Abadi bears the main responsibility for triggering war on the Kurdistan people, and will be made to pay a heavy price", the Peshmerga command said in a statement, cited by Kurdish leader Masoud Barzani's assistant Hemin Hawrami.

Washington, which works closely with both the federal forces and the Kurdish Peshmerga to fight against Islamic State, called on "all parties to immediately cease military action and restore calm", according to a U.S. Embassy statement.

"ISIS (Islamic State) remains the true enemy of Iraq, and we urge all parties to remain focused on finishing the liberation of their country from this menace."

The military action in Kirkuk helped spur a jump in world oil prices on Monday.

Oilfields near Kirkuk halted production, but Baghdad said it would quickly restart it. "We've got confirmation from military commanders that it's a matter of a very short time," a senior Baghdad oil official told Reuters. "Our brave forces will regain control of all Kirkuk oilfields and then we will restart production immediately."

Secession opposed by neighbors

Baghdad considers last month's Kurdish independence vote illegal, especially as it was held not just in the autonomous region but outside it, in Kirkuk and other areas the Kurdish Peshmerga occupied after driving out Islamic State militants.

The Kurdish secession bid was strongly opposed by neighbours Iran and Turkey. Washington, allied with the Kurds for decades, pleaded vainly for them to halt a vote that could break up Iraq.

There were signs of internal conflict among the Kurds, who have been divided for decades into two main factions, the KDP of regional government leader Barzani and the PUK of his longtime rival Jalal Talabani, who served as ceremonial Iraqi President in Baghdad from 2003-2014 and died two weeks ago.

Both parties control their own Peshmerga units. While Barzani's KDP strongly supported the independence referendum, some PUK figures were more circumspect.

Monday's Peshmerga statement accused a group within the PUK of "treason" for assisting Baghdad's advance. "We regret that some PUK officials helped in this plot," it said.

Although Iraqi officials portrayed the Kurds as retreating without a fight, Kurdish officials said Peshmerga had clashed with the "Popular Mobilisation" - Shi'ite Muslim forces trained and armed by Iran that operate alongside regular Iraqi troops.

The Peshmerga and Popular Mobilisation, an Iranian Shi'ite militia, exchanged artillery fire south of Kirkuk, a Kurdish security official said. The official said the Peshmerga had pushed back two assaults and destroyed several Popular Mobilisation vehicles, which were U.S.-supplied humvees.

The U.S.-led international task force in Iraq said it was aware of "a limited exchange of fire during predawn hours", which it believed was "a misunderstanding ... as two elements attempted to link up under limited visibility conditions".

Fate unsettled

The status of Kirkuk and fate of the Kurds were left unsettled 14 years ago when a U.S.-led invasion toppled Saddam.

During the years of U.S. occupation that followed, Washington leaned on its Kurdish allies to keep their ambitions in check to avoid triggering another war amid an insurgency by Sunni Muslim Arabs.

Since Islamic State swept across a third of Iraq in 2014 and were then driven out, the Kurds have found themselves in their strongest position on the ground for generations.

Their leader Barzani said the time had come for an independence referendum. But the vote crossed a red line in the region by apparently seeking to unilaterally redraw state borders.

Turkey, which had developed a good working relationship with the Iraqi Kurds and let the landlocked region export oil through its pipes, has swung behind Baghdad, furious at a secession bid that might ignite similar demands from its own Kurds.

In a statement, the Turkish government said it would stand by Baghdad to provide peace and stability in the region.