A suicide car bombing and an assault by grenade-throwing gunmen on a police headquarters in a disputed ethnically mixed city of northern Iraq killed 30 people on Sunday, security officials said.
The vehicle that was detonated in central Kirkuk had been painted to look like a police car, and the militants who sought to seize the compound were dressed as policemen, witnesses said.
The attack shattered a relative calm in Iraq, which has been grappling with a political crisis pitting Prime Minister Nuri al-Maliki against his erstwhile government partners amid weeks of protests calling for him to resign, all less than three months before key provincial elections.
No organisation immediately claimed responsibility for the attack, which was swiftly condemned by the US embassy, the UN mission, and Iraq's parliament speaker.
But local security officials blamed al-Qaeda's front group in Iraq, which often targets security forces and officials in a bid to destabilise the country and push it back towards the sectarian bloodshed of 2005 to 2008.
The suicide car bomb was set off during morning rush-hour and quickly followed by at least three gunmen wearing police uniforms, armed with hand grenades and suicide vests, bursting through the main gate of the Kirkuk police compound in the direction of the headquarters building.
They threw multiple grenades as they sought to reach the building, but were killed before they could do so, witnesses said.
Brigadier General Natah Mohammed Sabr, the head of Kirkuk city's emergency services, put the toll at 30 dead and 88 wounded. Among the casualties were four policemen killed and 12 wounded.
Brigadier General Sarhad Qader, commander of police forces for areas surrounding the city, was one of the those hurt.
"I saw a vehicle stop at the checkpoint at the main entrance, and the police started checking it," said Kosrat Hassan Karim, who was nearby when the attack took place.
"Suddenly, a loud explosion happened, it was terrifying.
Signup to our newsletter and follow us on Facebook and Twitter!
"I saw many people killed inside their cars -- I have never seen such a big explosion in my life."
In addition to the casualties, the attack caused massive damage to nearby buildings and shops, according to an AFP journalist at the scene.
The massive explosion also killed people in nearby buildings. Mohammed Aziz, who works in an office building adjacent to the police headquarters, said at least two of his colleagues died in the blast.
"It seems they came to free prisoners, because they came in a very organised way," General Qader, who suffered back wounds but is now in stable condition, told AFP from a hospital in Arbil north of Kirkuk.
"But the police clashed with them, and we killed all of them."
Police largely cut off traffic in the city centre and evacuated offices and businesses in the area.
Kirkuk, an ethnically mixed city 240 kilometres (150 miles) north of Baghdad, lies at the heart of a swathe of disputed territory claimed by both the central government and Iraq's autonomous northern Kurdish region.
The unresolved row is persistently cited by diplomats and officials as the biggest threat to Iraq's long-term stability.
Militants often exploit a lack of coordination between the two sides' security forces and launch deadly attacks in the city, which remains one of the most violent in Iraq, and also in nearby towns.
On January 16, twin car bombs in Kirkuk killed 33 people, while 42 people died in a suicide attack on a funeral in the nearby town of Tuz Khurmatu, which also lies in the disputed area, the following week.
Also on Sunday, in three separate attacks north of Baghdad, in Tarmiyah and Baquba, two anti-Al-Qaeda militiamen were killed and three people wounded, officials said.
The violence was the latest in a spike in unrest that comes amid the political tension -- 246 people were killed last month, the most since September, according to an AFP tally.