At least five suicide bombers targeted government buildings
Islamic State fighters have carried out a raid on the Iraqi city of Kirkuk, in an attempt to divert attention from the huge offensive against the group's stronghold of Mosul.
According to reports, up to 100 militants - some carrying grenades and wearing explosives vests or belts - were involved in the assault on the strategic city, around 170kms southeast of Mosul.
Firefights erupted across the city as security forces tried to regain control of buildings and streets.
At least five suicide bombers targeted government buildings, including Kirkuk's main police headquarters.
At least six police officers and 12 jihadists were reportedly killed in the clashes. Several dozens others are said to have been injured.
Reporter Sam Kiley, in Iraq, said: "Kirkuk is the centre of northern Iraq's oil industry, and this attack was clearly intended to draw resources and focus away from the battle in Mosul where IS fighters have been counter-attacking - but are being driven back.
"The militants reportedly rose up against an entire city that detests them and yet they were able to pretty much paralyse the entire place and still have not been entirely weeded out."
He added: "This is also really a good indicator of just how dangerous the battle for Mosul promises to be.
"The fighting on the outskirts has been intense but it has been easier for the attacking forces - from the government and the peshmerga - because it is a free-fire zone and there are no civilians in the villages that they are trying to re-capture.
"That is not the case when you get inside Mosul where there are between 500,000 and a million people, and there are around 550 families, Christians and Yazidis, who have been reportedly rounded up and used as human shields."
Iraqi Prime Minister Haider al Abadi's office announced that reinforcements would be dispatched to Kirkuk to help track down remaining attackers and end the crisis.
IS controlled more than a third of Iraq two years ago, but its self-proclaimed "caliphate" has been shrinking steadily.
A 60-nation US-led coalition and neighbouring Iran have helped Iraqi forces regain one city after another, and Mosul is now the group's last major stronghold in the country.
But roadside bombings and suicide attacks by IS are posing a danger to Iraqi forces and their allies as they advance on Iraq's second city.
Iraqi forces have not provided figures for their losses, but in a statement they said "a number of peshmerga have paid the ultimate sacrifice".
The coalition announced that a US service member accompanying elite Iraqi forces northeast of Mosul was killed on Thursday.
The UN fears that up to a million people may be trapped inside Mosul and could be forced to flee, sparking a humanitarian disaster.
The troops working to liberate the city have so far come across hundreds of civilians but it has been reported that a few thousand had left Mosul to cross into Syria.
Around 500 are now at a refugee camp and the others are on the border.