This Aug. 17, 2015, photo shows a general view of the northern Iraqi town of Sinjar, west of the city of Mosul. (Safin Hamed/AFP/Getty Images)

Iraqi forces seized several northern towns from Kurdish fighters on Tuesday, as the federal government in Baghdad expanded its swift campaign to reassert authority in areas that have been disputed for nearly two decades.

The campaign, which began over the weekend with Iraqi forces moving to control the oil-rich city of Kirkuk, has grown to include areas that Kurds had claimed after the U.S. invasion in 2003. The operation has significantly shrunk Kurdish-controlled territory and raised doubts about the future of the region's political leadership, which has long agitated for independence.

In his first public comments since the loss of Kirkuk, the president of Iraqi Kurdistan, Masoud Barzani, urged Kurds to remain united and suggested his political rivals were to blame for the crisis. He has come under intense pressure since moving ahead with a bid for independence that appears to have backfired. 

Baghdad's push into the contested territories comes after a Kurdish referendum on independence last month that was opposed by the central government, the region's neighbors and the United States. The dispute has undermined the U.S. goal of a coordinated military campaign against the Islamic State militant group that would translate into political cooperation between the two key American allies.

Last year to the day, Kurdish and Iraqi forces launched a battle to reclaim Mosul from the Islamic State after a historic agreement to fight in tandem. That military cooperation has been replaced in recent days by the threat of the two sides turning their guns on each other — though Tuesday's push by Iraqi forces appeared to avoid armed conflict as Kurdish fighters pulled back of their own accord.

Barzani said the withdrawal of the Kurdish peshmerga forces on Tuesday from disputed territories, which he blamed on a "unilateral decision" by some of his political rivals, meant that negotiations with Baghdad over troop distribution in the region would now be based on where Kurdish forces were stationed before the Mosul operation began last year. 

Many of the areas ceded on Tuesday had been in Kurdish hands long before that battle was launched. 

According to officials in the towns of Sinjar, Makhmur, Bashiqa, Rabia and in the Mosul dam area, peshmerga forces with the ruling party of the Kurdistan Regional Government withdrew from their posts as Iraqi forces approached. A spokesman for the peshmerga did not respond to requests for comment.

Militia forces affiliated with the Iraqi government seized control of Sinjar, near the border with Syria, early Tuesday.

A force of local Yazidis, part of Iraq's popular mobilization movement of militias, took control of the town, residents and fighters said. A few hours later, Baghdad-allied Shiite militia forces entered, they added. 

Iraqi forces also announced on Tuesday the retaking of the oil fields of Bai Hassan and Avana near Kirkuk, potentially depriving the Kurdish region of its main source of revenue. Baghdad has accused the Kurds of illegally exporting oil.

In a triumphant news conference two years ago after Kurdish forces took Sinjar from Islamic State militants, Barzani vowed no flag other than the Kurdish one would fly over the town.

But the Iraqi flag went up in Sinjar on Tuesday for the first time since 2003, residents said.

Sheikh Khalaf Bahri, a Yazidi religious leader, said the situation was calm, although residents were staying indoors.

"It's too early for them to know if they are safe," he said. "We hope that this will be resolved soon, and we hope that the Yazidi people will not be subject to any attacks."

Elias Sinjari, a resident, said the peshmerga forces withdrew in the night, except for those originally from the town. They were replaced by a Baghdad-backed Yazidi militia known as the Lalish Force.

"I don't care who holds our city, whether it's peshmerga or Iraqis. What we care about is living in peace and to be protected," he said by phone. "Everybody claims they care about Sinjar when, in fact, no one did anything for Sinjar. We are just a card they use when they need and then can throw away."

Since retaking Sinjar two years ago, Barzani has tried to assert control over a wide swath of territory bordering the Kurdish region and stamp out the influence of Baghdad and rival Kurdish groups. 

While many Yazidis consider themselves ethnically Kurdish, not all do. Some accuse Barzani, whose peshmerga fighters guarded the area before the Islamic State's conquest, of abandoning them in 2014. 

When the peshmerga withdrew, the Islamic State slaughtered thousands of Yazidi men and captured thousands of Yazidi women to hold as sex slaves. 

Many Sinjar residents view the arrival of the new forces, particularly Shiite militias from a different part of the country, as an uncomfortable reminder of that trauma.

"Unfortunately, again, the forces that were expected to protect the Yazidis left the Yazidis alone without firing a single bullet," said Haider Shesho, a local Yazidi commander. 

He said Yazidi leaders were trying to negotiate for the forces from outside the region to leave the Town Center. "We have no problem with the Yazidi force," he said. "We would like international intervention. The Yazidis have suffered a lot."

Shwan reported from Irbil, Iraq. Mustafa Salim contributed to this report.