Fears are growing over a regional showdown over Mosul as the military operation against ISIL enters its third week.

The battle for Mosul is galvanising regional powers into actions that might upset the present balance of power in the region, analysts warned.

“We cannot predict if there will be a [regional] clash or not, but … things are heading to the worse and there will be big surprises,” said Muaayad al-Windawi, a retired Iraqi army officer and political analyst at the Iraqi Center for Strategic Studies in Amman, Jordan.

As the battle to take Mosul from the Islamic State of Iraq and the Levant fighters (ISIL, also known as ISIS), enters its second week, Turkey, one of the key regional players, is facing a difficult challenge, according to analysts.

“These moments are decisive … It will be a real test for Turkey. Erdogan warned the Shia militias [Popular Mobilisation Units, or PMUs] from entering Mosul or the town of Tel Afar, which has a Sunni Turkmen population, now the [PMU] forces are headed there,” Windawi told Al Jazeera.

Recently, Turkey’s relation with Iraq’s central government turned sour, triggering a war of words over the Turkish military presence in Bashiqa, east of Mosul, to train Iraqi forces, including Sunni tribal fighters and Kurdish Peshmerga, to fight ISIL.

Iraqi Prime Minister Haider al-Abadi described the Turkish presence as “an occupying force”, with hundreds of soldiers coming in with tanks and artillery, plotting to create divisions among Iraqis.

READ MORE: Why Iraq needs more than military victory in Mosul

”We ”Muaayad

clash or not but … things are heading to the worse and there will be big surprises.”]

Analysts say the dispute between Ankara and Baghdad could threaten to derail the plan to retake Mosul from ISIL. On Friday, US officials said they were scrambling to end the dispute between Ankara and Baghdad. “There is a lot of tension, and the public rhetoric has gotten a bit out of hand,” a senior US administration official said. “It’s an extremely troubling scenario.”

Turkey’s policy shift in Syria and Iraq, according to analysts, is closely linked to the failed coup attempt that took place last July.

“Turkey has changed after the failed coup attempt … it got rid of the military generals that are refusing government policies … if it doesn’t act now, it will be too late,” says Resul Serdar Atas, a Turkish journalist and commentator.

Turkey, explains Atas, realised that it made a mistake by its inaction in Syria and Iraq over the last five years, thus allowing the armed Kurdish group, PKK, “to create a semi-state on Turkey’s border”.

“Now, Turkey is flexing its muscle in Syria, is pushing towards al-Bab [in northern Aleppo] to clear it from ISIL … Turkish military presence in Iraq’s Bashiqa camp is a guarantee to Sunnis and Kurds who mistrust the Hashed [PMUs] and the federal government,” adds Atas. “It will intervene if this force advances to Tel Afar or enters Mosul and commits collective punishment against Sunnis.”

Despite the tense situation, a direct military confrontation between Turkey and Iran, the two regional archrivals, remains unlikely, according to Atas. “Turkey and Iran can be destructive to each other. There will be too much to lose for both; it will be an increased proxy war,” he says.

“Turkey will shift the balance of power and will take care of its own security … and could face the militias in Iraq directly or indirectly.”

In terms of the regional balance of power, Iraq remains the weakest in this crisis. The government is struggling to maintain ethnic, social and political unity while trying to end ISIL’s presence and curb the sectarian violence that gripped the nation since the US-led invasion of 2003.

Despite the Iraqi-Turkish dispute, Baghdad is well-aware of Turkey’s “redlines” in Mosul. Prime Minister Abadi said only Iraqi army and police would enter Mosul. However, these forces, according to one analyst, are heavily infiltrated by Shia militias and has been accused by Sunni politicians and residents of being too sectarian.

“Baghdad is working to impose the law of the victor and vanquished in Mosul,” said Hisham al-Hashimi, head of the antiterrorism unit at the Baghdad-based Akad Center for Strategic and Future Studies.

“The ethnic components will share power there … the victor will impose its conditions, and all the Sunni politicians who are loyal to the government will follow,” Hashimi told Al Jazeera.

On Sunday, PMUs said they had launched an assault to the west of Mosul, opening up a new front in the battle to drive ISIL from the country’s second city and the group’s last major bastion in the country. A spokesman for the coalition, Ahmed al-Asadi, told a news conference that seven hours into the operation 10 villages had been “liberated” from ISIL.

“The Hashed [PMUs] will head to the western front to stop Daesh [ISIL] fighters from leaving Mosul and going into Syria. They will also clear the road for the Shia factions coming from the province of Salaheldin, Tel Afar, Raqqa and Aleppo.

“That is also what both Russia and Iran want.”

READ MORE: Mosul battle could cause a ‘human catastrophe’

Iran, Iraq’s main political and military ally, has welcomed the Mosul operation and called for an end of ”terrorist groups”. “Liberating Mosul for the Iraqi government is like Aleppo for the Syrian government,” said Ali Akbar Velayati, a former foreign minister and adviser to Iran’s supreme leader.

He added that his country has military ”advisers” helping Iraqi armed forces defeat ”terrorists”. Iran’s military involvement in Iraq, Syria and Yemen over the last few years has infuriated Iraq’s neighbours.

Statements and actions made by Iraqi leaders with close ties to Iran are deepening the regional divide, say analysts. Iraq’s vice president, Nouri al-Maliki, who was prime minister when ISIL overran Mosul in 2014, said in a conference held in Baghdad that after Mosul, there will be other regional battles.

”Operation Coming Nineveh [military name for the operation to retake Mosul] also means that we are coming Raqqa, We are coming Aleppo and we are coming Yemen,” said Maliki as he sat next to Velayati.

Such statements, according al-Windawi, are “irresponsible and would increase the sectarian tensions in the region”. While Saudi Arabia welcomed the Iraqi government’s military operation against ISIL, it also warned of ”a bloodbath” if PMUs entered the city.

On Saturday, the Turkish president raised concerns about the advance of the PMUs towards the Tal Afar district of Iraq’s Mosul province.

“Tal Afar is a totally Turkmen city, with half Shia and half Sunni Muslims. We do not judge people by their religious affiliation; we regard them all as Muslims.”

“But if Hashed al-Shaabi terrorises the region, our response would be different.”

Erdogan’s statements raised fears of a possible regional showdown over the Mosul battle.

“The Americans and the Russians agree on ending the Sunni rebellion [in Iraq and Syria ],” said Hashimi. “Russia and the US don’t want to fight these groups [ISIL and others], so they rely on the Shia factions to do just that.”

Omar Al Saleh is a former Al Jazeera correspondent and an analyst on Middle East affairs.