Gunmen and suicide bombers stormed a provincial council in central Iraq on Tuesday after exploding a car bomb outside, killing at least eight people before US-assisted Iraqi forces regained control of the building.
The assault in Diyala province's capital Baquba, 40 km (65 miles) northeast of Baghdad, was the latest test for Iraqi forces as they prepare for a planned withdrawal of US troops from the OPEC oil producer at the end of this year.
At least five gunmen disguised as Iraqi forces stormed the main gate after a car bomb exploded and a suicide bomber detonated his explosives outside.
A second suicide bomber blew himself up as the attackers clashed with police, witnesses and local officials said.
An Iraqi counter-terrorism official told Reuters the five gunmen who raided the council were killed in the attack, which he said bore the hallmarks of Al-Qaeda.
During the fighting, several council employees caught inside one part of the compound said they managed to escape through a side entrance with the help of Iraqi and US forces.
"I heard four to five big explosions," Salim al-Zaidy, a local human rights worker who was inside the building during the attack, told Reuters. "The Iraqi army special forces and US forces released us, using a back gate."
The US military said in a statement that US forces had only provided "observation support" from helicopters.
At least eight people were killed in the attack and around 25 more wounded, local government and hospital officials said.
More than eight years after the invasion that toppled former dictator Saddam Hussein, violence in Iraq has dropped since the peak of the bloody sectarian conflict in 2006 and 2007 when Sunni and Shi'ite groups fought each other and Iraqi forces.
Sunni and Shiite militias still carry out daily bombings and killings, and insurgents have increasingly targeted local security forces and government officials in their attacks. Diyala is a volatile area where al Qaeda affiliates and other militia are still active.
"The terrorists intended to detain provincial council members and workers to demand the release of other terrorists in return. This is one of the tactics of al-Qaeda," the Iraqi counter-terrorism official told Reuters.
Gunmen stormed a provincial council headquarters in Tikrit in March, taking hostages before security forces ended the siege. At least 58 people were killed and al Qaeda's Iraqi affiliate claimed responsibility.
Two US service members were killed while conducting operations in southern Iraq on Monday, the US military said. Five American soldiers were also killed last week in a rocket attack on their base in Baghdad.
US forces officially ended combat missions last August and the remaining 47,000 American troops are scheduled to leave Iraq at the end of this year when a bilateral security pact ends.
US soldiers are now mainly engaged in advising, assisting and training local Iraqi forces.
Iraqi government leaders are currently debating whether to ask some of the US forces to stay on longer, a sensitive question that is testing the fragile cross-sectarian government of Prime Minister Nuri al-Maliki.
His Shiite-led government says local Iraqi forces can contain any internal threat, but officials acknowledge there are gaps in Iraqi military capabilities, especially in air and naval power and intelligence gathering.