Armed men have stormed an Iraqi provincial council building in Baquba after two car bombs exploded outside, killing at least eight people and wounding dozens more, police and health officials say.

Two car bombs were set off outside the government compound in the city on Tuesday, after which armed men attacked the building and took hostages in the nearly three-hour siege.

Baquba, Diyala province's capital, is located 60km northeast of Baghdad.

Large numbers of Iraqi police and soldiers were deployed to the scene, with military helicopters hovering overhead and periodically firing onto the building during the siege, an AFP reporter at the scene said.

Al Jazeera's Jane Arraf, reporting from Baghdad, said that the hostage-taking appeared to have ended following the efforts of Iraqi security forces.

"According to officials the building was stormed by Iraqi security forces, special forces and the Iraqi army, who killed three attackers and wounded a fourth," she said.

"One witness says American forces joined them. The Americans say that is not true." 

The attack closely mirrored a similar March 29 incident, claimed by al-Qaeda, on Salaheddin governorate offices in Tikrit that left 58 people dead.

"There has been no claim of responsibility so far, but it very much bears the hallmarks of an al-Qaeda linked group and that is indeed what officials here are saying," our correspondent said. 

An official at Diyala's security command centre initially said dozens of armed men took part in the raid, but Baquba police later said as few as five may have been involved.

Al Jazeera's Arraf said the events took place during a weekly council meeting of provincial council members, but many of them did not show up having been warned of the possibility of an attack.

The attack in Baquba is the latest test for Iraqi forces as they prepare for the planned withdrawal of US troops at the end of the year.

Source: Al Jazeera and agencies