Islamic State has launched a major attack on the city of Kirkuk as Iraqi and Kurdish forces pursued operations to seize territory around Mosul in preparation for an offensive on the jihadists' last major stronghold in Iraq.
Islamic State's Friday assault on Kirkuk, which lies in an oil- producing region, killed 18 members of the security forces and workers at a power station outside the city, including two Iranians, a hospital source said.
Crude oil production facilities were not targeted and the power supply continued uninterrupted in the city. Kirkuk is located east of Hawija, a pocket still under control of Islamic State that lies between Baghdad and Mosul.
With air and ground support from the US-led coalition, Iraqi government forces captured eight villages south and southeast of Mosul. Kurdish forces attacking from the north and east also captured several villages, according to statements from their respective military commands overnight.
The offensive that started on Monday to capture Mosul is expected to become the biggest battle fought in Iraq since the US-led invasion in 2003.
US Defence Secretary Ash Carter said on Friday Turkey and Iraq had reached an agreement in principle that could allow a Turkish role in the Mosul campaign.
Speaking in Ankara after talks with Turkish President Tayyip Erdogan, Carter said the details still needed to be hammered out. NATO member Turkey sees Mosul as firmly within its sphere of influence, but Iraq views Turkish military moves on its territory with apprehension.
About 1.5 million residents are still believed to be inside Mosul. Islamic State has taken 550 families from villages around Mosul and is holding them close to IS locations in the city, probably as human shields, a spokeswoman for the UN human rights office said in Geneva.
The fighting has forced 5640 people to flee their homes so far from the vicinity of the city, the International Organisation for Migration said late on Thursday.
A senior Kurdish military official told Reuters the offensive by the Iraqi and Kurdish forces was moving steadily as they push into villages on the outskirts of Mosul.
But he expected the offensive to slow as they approach the city, where Islamic State has built trenches and dug tunnels.
"I believe it will be more clear within the coming weeks... how quickly this war will end. If they [Islamic State] decide to defend the actual city then the process will slow down."
Islamic State denied that government forces had advanced. Under the headline "The crusade on Nineveh gets a lousy start," the group's weekly online magazine Al-Nabaa said it repelled assaults on all fronts, killing dozens in ambushes and suicide attacks and destroying dozens of vehicles including tanks.
In Kirkuk, Islamic State attacked several police buildings and a power station in the early hours of Friday and some of the attackers remained holed up in a mosque and an abandoned hotel.
At least eight militants were killed, either by blowing themselves up or in clashes with the security forces, the security sources said. Kurdish forces had dislodged the militants from all the police and public buildings they had seized before dawn, they said.
Islamic State claimed the attacks in online statements, and authorities declared a curfew in the city where Kurdish forces were getting reinforcements.