Western nations, including the United States and Canada, face a new and difficult task in Iraq: getting two former allies who recently turned their guns on each other to refocus their battlefield efforts on a shared enemy, ISIS.

Iraqi security forces continue their campaign to restore Baghdad's full control over the contested region around the northern oil city of Kirkuk. On Monday, Kurdish Peshmerga fighters fled from positions they had held for more than three years after Iraq's prime minister launched a military operation.

Despite the retreat of most of the Peshmerga, Kurdish leaders called the Iraqi operation a "declaration of war."

The Kurdish push for independence, and the Iraqi response, could complicate the push to drive the self-proclaimed Islamic State from the country. The anti-ISIS coalition has made major gains recently. On Tuesday, the UK.-based Syrian Observatory for Human Rights announced that U.S.-backed militias had retaken the Syrian city of Raqqa, which had been the capital of ISIS's so-called caliphate since 2014.

MIDEAST-CRISIS/IRAQ-KURDS-KIRKUK

While there were some clashes, most Kurdish Peshmerga fighters fled Kirkuk. (Reuters)

'We're not taking sides'

On Tuesday, Iraqi forces continued their drive to assert government control over oilfields northwest of Kirkuk, a day after the Iraqi flag replaced the Kurdish one high above administration buildings across the oil city.

The U.S. has provided training and arms to both the Kurds and Iraq's security forces. The escalating conflict between the two former allies who fought together against ISIS offers a critical test of American influence in Iraq.

"We don't like the fact that they're clashing. We're not taking sides," U.S. President Donald Trump said on Monday. "We've had for many years a very good relationship with the Kurds, as you know, and we've also been on the side of Iraq."

A majority of Kurds backed independence in a non-binding referendum three weeks ago, in a vote that was dismissed by Iraq's government as unconstitutional. Iraqi Prime Minister Haider al-Abadi said the recent military assault was meant to "impose security" on the region. But the operation is also Baghdad's strongest move yet against the Kurdish separatist movement.

Kirkuk, a contested city of about a million Kurds, Arabs and Turkmen, has long been desired by the Kurds as their capital, which has led some Kurds to call it the "Kurdish Jerusalem." Now, with the loss of Kirkuk, it appears the Kurdish push to establish their own nation in the northern third of Iraq has backfired.

MIDEAST-CRISIS/KURDS-REFERENDUM

A man who voted in the referendum on Kurdish independence on Sept. 25 shows his ink-stained finger after casting his ballot. (Ahmed Jadallah/Reuters)

Kurdish leaders now isolated

The Kurdish regional government in Erbil, which controls a semiautonomous region in northern Iraq, relies heavily on oil revenue to cover expenses, including food purchased from Iran and Turkey. It's estimated that about half of those revenues came from the oilfields in the Kirkuk region. 

Iraq's Kurds have largely had good relations with their neighbours and western nations, and have been viewed as a robust ally in battling ISIS. But the recent referendum forced allies to side with Baghdad, which has left the Kurdish leader, president Masoud Barzani, isolated.

The U.S. condemned the Sept. 25 independence vote, fearing it could lead to the breakup of Iraq. 

Iraq Cda 20170220

Canadian special forces look over a Peshmerga observation post earlier this year. (Ryan Remiorz/Canadian Press)

Canada's position affirmed the "unity and diversity of the Republic of Iraq." A statement from Global Affairs Canada went on to "support Iraq's territorial integrity."

Canada has approximately 200 special forces in Iraq, and have trained Kurdish Peshmerga. More recently, the Canadian Forces says its soldiers have been working with Iraqi troops in the fight against ISIS.

Canada 'very concerned'

Speaking to reporters outside the House of Commons on Monday, Defence Minister Harjit Sajjan downplayed the situation in Kirkuk.

"This is internal issues that they have to resolve, and we encourage all parties to do it in a responsible manner," Sajjan said. "We're committed to supporting a unified Iraq where we can actually deal with the main threat that's in front of us, which is defeating Daesh," the minister added, using the Arabic acronym for ISIS.

In a statement to CBC News, Global Affairs Canada said Ottawa is "very concerned by recent events" in Kirkuk and urged the Kurds and Iraqi government "to pursue a productive and peaceful dialogue."

MIDEAST-CRISIS/IRAQ-MOSUL

An Iraqi Airforce helicopter fires missiles at ISIS fighters near Mosul earlier this year. (Goran Tomasevic/Reuters)

ISIS, which controlled a third of Iraq three years ago, has now been driven from all of Iraq's major cities, including most recently Mosul. Iraqi security forces continue their operations against the militants in a handful of rural areas and one small city along the Syrian border.

As Iraqi forces conducted their assault on Kirkuk on Monday, the U.S.-led coalition against ISIS carried out at least two airstrikes against militant positions.

U.S. military leaders in Iraq will continue to press both sides to end their fighting over Kirkuk and once again focus on battling the remaining ISIS members still in Iraq.

"We oppose violence from any party, and urge against destabilizing actions that distract from the fight against ISIS and further undermine Iraq's stability," said Pentagon spokeswoman Laura Seal.