Iraqi forces and the Hashed al-Shaabi (Popular Mobilization) deploy toward the village of Ayn Nasir, south of Mosul, on Friday. Iraq’s Shiite militias on Saturday said that they had joined the operation to recapture Mosul. (Ahmad Al-Rubaye/AFP/Getty Images)

Iraq’s Shiite militias said Saturday that they had joined the operation to recapture the Islamic State-held city of Mosul, a move that could whip up sectarian and regional tensions in an already complex battle.

Militia leaders said that they launched an offensive toward the town of Tal Afar, about 40 miles west of Mosul, in the early hours of the morning. More than 10,000 fighters are participating, they said.

Containing the role of powerful Shiite militias presents a challenge for Prime Minister Haider al-Abadi as Iraqi troops push toward the largely Sunni city of Mosul in the country’s largest military operation since the 2003 U.S.-led invasion. In past battles against the Islamic State, the Iraqi militias have been accused of kidnappings and executions.

After more than two years of Mosul being under the militants’ rule, the battle is seen as a chance to reset relations between the city’s Sunnis and the Shiite-led government, which had plunged so low by 2014 that some of its residents welcomed the militants. How the advancing forces deal with the local population is key to rebuilding trust.

Shiite militia leaders have agreed not to enter Mosul itself for now. But Tal Afar, where the militias are now focused, is itself a dangerous flash point, analysts have said. The town where Sunnis and Shiites once mixed has the potential to be the scene of revenge killings.

The presence of Iranian-backed militias could also give Turkey, which has repeatedly insisted on a role in the Mosul operation despite furious protestations from Baghdad, an excuse to deepen its involvement, raising the specter of more conflagration.

Turkey has said it has a duty to protect the people of Tal Afar, who are ethnic Turkmen, but it also has a strategic interest in countering Iranian influence in Iraq. It has stationed hundreds of troops near Mosul and trained local Sunni fighters, ignoring Baghdad’s repeated requests for them to leave.

“The Tal Afar issue is a sensitive subject for us,” Turkish President Recep Tayyip Erdogan said in a speech in Ankara on Saturday, adding that he had made Turkey’s position clear to “all authorities”. If Shiite militias “extend terror” there then “our response will certainly be different,” he said, without clarifying how.

Any Turkish forces in Iraq will be dealt with “as the enemy,” said Jawad al-Tleibawi, a spokesman for the Asaib Ahl al-Haq Shiite militia. “We already have plans to confront any intervention by them,” he said. Tleibawi said Shiite militias also planned to retake Hatra and Baaj, putting them in the vicinity of Kurdish peshmerga forces, who have clashed with them in the past.

[Iraqi troops pause in Mosul push to clear Islamic State defenses, Pentagon says]

Many of Iraq’s Shiite militias formed after 2003 to fight U.S. troops, but they have burgeoned since 2014, when they stepped in to fill security gaps as the Iraqi army collapsed in parts of the country.

Due in part to sectarian concerns, the militias have been gradually sidelined during operations to retake largely Sunni urban centers from Islamic State militants, but they have fought on the outskirts of those battles.

When Iraqi forces retook the western city of Fallujah earlier this year, militias were accused by rights groups and local government officials of kidnapping hundreds of men as they fled the city.

“This morning the second page of the Mosul operations started,” said Ahmed al-Assadi, a spokesman for the umbrella group of mostly Shiite militia forces known as popular mobilization units. He said they were moving toward “beloved Tal Afar.”

Tal Afar had a sizable minority of Shiites before Islamic State militants captured the town in 2014, and they were forced to flee. Some were later recruited into Shiite militias.

Turkey will take all necessary measures allowed by international law to counter any threat from Shiite militias to Turkmen in Tal Afar, Turkish Foreign Minister Mevlut Cavusoglu said Wednesday, according to the Anadolu news agency.

“Ethnic and sectarian balances must be taken into account in Mosul and Tal Afar,” he said.

U.S. diplomats last week failed to broker an agreement between Turkey and Iraq about what role the Turks would play in the offensive.

The Shiite militias will join an already disparate array of forces on the ground, including Kurdish peshmerga, Sunni tribal fighters and Iraq’s police and army. Iraqi forces are within four miles of the outskirts of Mosul on the eastern front, commanders have said, while the Iraqi military said Saturday that it had retaken Shura, 25 miles south.

Jets from the U.S.-led coalition have also been backing the offensive for Mosul, though U.S. military officials said they do not provide air support for any groups not under the direct command and control of the Iraqi military.

Assadi said the militia forces were being supported by the Iraqi air force and had advanced 20 miles since they began their assault. They will need to retake a string of villages west of Mosul before reaching Tal Afar.

“Tal Afar will be our last target,” he said.

Zeynep Karatas contributed from Istanbul.