Thousands of people are leaving the Iraqi city of Kirkuk as the Iraqi army advances on Kurdish military positions around the city.

Federal forces, backed by Shia militia, have launched a major offensive over two fronts on Monday, aimed at retaking the Kurdish-held city.

Al Jazeera's Charles Stratford, reporting from the outskirts of Kirkuk, said an increasing number of Kirkuk residents were trying to flee.

"Thousands of cars are filling the roads leading out of Kirkuk and the numbers are increasing. There is a lot of fear in the city [due to] the Iraqi army's advance."

The Iraqi army said it has seized control of the city's airport, in addition to an oil field, the strategic K1 military base and the Taza Khormatu district southeast of Kirkuk.

Kurdish forces known as the Peshmerga were digging in at the edge of the airport after withdrawing from their positions outside the northern city.

Hundreds of armed Kurdish residents were taking up positions inside the city, anticipating an attack.

READ MORE: Iraqi forces launch 'major' Kirkuk operation

Residents of the multi-ethnic city, home to about a million Arabs, Kurds, Turkmen and Christians, stayed inside and reported hearing sporadic booms which they said sounded like shelling and rocket fire.

The Kurdistan Region Security Council said in a statement that the Peshmerga destroyed at least five Humvee armoured vehicles being used by the state-sanctioned militias, following the attack south of the city.

An Iraqi Kurdish commander said the fighting with Kurdish forces caused "lots of casualties" without providing a specific figure.

Brigadier General Bahzad Ahmed said Iraqi troops "burned lots of houses and killed many people" in Tuz Khurmatu and Daquq, south of the disputed city.

His claims could not be independently verified.

'Protecting national unity'

Iraqi Prime Minister Haider al-Abadi said in a statement that the offensive was aimed at protecting national unity.

"It is my constitutional duty to work for the benefit of the citizens, and to protect our national unity that came under threat of fragmentation as a result of the referendum that was organised by the Kurdish region," Abadi said.

"The referendum came at a time where the country is fighting against terrorism that has come in the form of ISIL. We tried to urge (the Kurds) not to violate the constitution and to focus on fighting ISIL, but they did not listen … They chose their personal interests over Iraq's interests."

READ MORE: What price have Iraqi Kurds paid for secession vote?

The prime minister further assured Kirkuk's residents that their safety was Iraq's priority, while calling on the Kurdish forces to align themselves with the federal army.

"We are only performing our duty in keeping the city safe for Iraq's various factions. We urge all citizens to cooperate with our heroic armed forces … in implementing security in the area.

"We call on the Peshmerga forces to perform their duties under the central command of the Iraqi armed forces," he said.

'Unprovoked attack'

The KRSC said in their statement that the "Peshmerga will continue to defend Kurdistan, its people and interests."

"This was an unprovoked attack following days of Iraqi military deployments to Kurdistan's borders."

Iraqi forces/PMF now advancing from Taza in South of Kirkuk in a major op w/ intention to enter the city and takeover K1 base & oil fields. — KR Security Council (@KRSCPress) October 15, 2017

Hemin Hawrami, senior assistant to Kurdish Regional Government (KRG) President Masoud Barzani, also said on Twitter that Peshmerga forces had been ordered "not to initiate any war, but if any advancing militia starts shooting", then they had the "green light to use every power" to respond.

Al Jazeera's Stratford said Kurdish forces in and around Kirkuk "have vowed to defend it to the last man". He added that the Kurdish governor of Kirkuk has reportedly called residents to arms, "saying anybody with a weapon should take it up and defend the city".

The Iraqi army said the operation is being spearheaded by the 9th armoured division, the federal police and counterterrorism units, Stratford reported.

"They are saying that thousands of Shia militias are very much in a supportive role," he said.

The launch of the operation followed a tense standoff between the two sides amid an escalating dispute in the wake of a controversial September 25 referendum on Kurdish secession.

"It seems as if all diplomatic efforts have failed," said Stratford, calling the push a "very worrying" development.

"Despite repeated denials by the Iraqi army that they were going to move on into the city and retake these oil fields, it seems very much as if that is happening now."

Rising tensions

Kurdish Peshmerga forces took control of oil-rich Kirkuk after the Iraqi army fled a major offensive by the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) armed group in 2014.

Since then, there has not been an agreement between the KRG and the federal government in Baghdad about who should control the area - and also benefit from its vast oil wealth.

"Kirkuk is hugely important for the KRG and the Iraqi federal government," said Stratford.

"It is one of the two main oil-producing areas of the country, believed to have around four percent of the world's oil resources."

Tensions between the two sides have been running especially high since Iraqi Kurds overwhelmingly voted for secession in last month's referendum, that Baghdad rejected as illegal.

The non-binding poll was held in areas under control of the KRG and in a handful of disputed territories, including Kirkuk.

Shortly after the referendum, the Iraqi parliament asked Abadi to send troops to Kirkuk and take back control of the region's oil fields.

On Sunday, Kurdish leaders rejected a demand by Baghdad to cancel the outcome of the referendum as a precondition for talks to resolve the dispute.

"So long as the Kurds were willing to remain within Iraq, whoever controls Kirkuk and the oil fields in Kirkuk was not as critical an issue," Feisal Istrabadi, director of the Center for the Study of the Middle East at Indiana University, told Al Jazeera.

"After the referendum, when there is talk of independence while there is a de facto Kurdish presence in Kirkuk, the stakes became much higher - and this, unfortunately, is the result," he added, referring to the military operation.

READ MORE: A look into Iraq's disputed Kirkuk

Kirkuk province lies outside the official borders of the Kurds' semi-autonomous territory. It is home to Kurds, Arabs, Turkmen and Christians.

The vast majority of Turkmen and Arabs who have lived in Kirkuk for generations boycotted the referendum.

"There are many Kurds who call it their Jerusalem," said Stratford, "but there's also considerable opposition among the Arabs and the Turkmen about any idea with respect to Kirkuk being part of a future independent Kurdish state."