30 people have been killed in an overnight attack by Islamic State militants in the Iraqi city of Tikrit.
A police source told the BBC that the militants targeted officers in the central Zuhur district, and then opened fire randomly at civilians nearby.
At least two of them detonated suicide belts during clashes with police, which could still be heard after sunrise.
The assault comes as government forces continue an offensive to retake Mosul, the last major IS stronghold in Iraq.
Tikrit is 185km (115 miles) to the south, but the jihadist group has launched a number of surprise counter-attacks across the country since the operation began almost six months ago.
Police Colonel Khalid Mahmoud told Reuters news agency that about 10 militants dressed in police uniforms were involved in Tuesday night’s attack.
Col Mahmoud said the militants initially targeted a police checkpoint and the home of a senior officer nearby, killing him and members of his family.
Two of the militants blew themselves up when surrounded by police, and three others were killed in separate clashes, he added.
Col Mahmoud said five other militants were thought to be hiding and that the local authorities had declared a curfew until they were apprehended.
The IS news agency Amaq reported that seven “commando” fighters had attacked a base of the federal police’s Rapid Response Force and one of its patrols, and then broken into the house of Tikrit’s head of counter-terrorism. The militants then battled security forces for two hours before blowing themselves up, Amaq added.
A doctor at the city’s hospital told the BBC that 34 people had been killed and 46 others wounded, many of them civilians.
Tikrit, a predominantly Sunni Arab city, was captured by IS militants when they overran much of northern and western Iraq in June 2014.
Troops and Iranian-backed Shia paramilitary fighters retook the city in April 2015, but IS has since managed to mount occasional attacks there.