The US will pull 12,000 troops from Iraq over the next six months as part of the Obama administration's promised withdrawal of all combat forces by August next year, military chiefs announced yesterday.

The troops will likely be removed from Anbar and Baghdad provinces, and the number of US combat brigades will drop from 14 to 12 over the next six months, they said. In addition, Iraqi and US officials confirmed that Britain's remaining 4,000 troops in the country would leave by the end of July.

But the formidable security challenges that the occupying forces will leave behind were underscored yesterday when a suicide bomber killed about 30 people and wounded dozens more in the worst attack for weeks in the Iraqi capital.

The attacker detonated an explosive vest as he drove a motorcycle into a group of police officers and recruits waiting at a side entrance of Baghdad's police academy on a busy street in the centre of the Iraqi capital. Iraqi and US forces sealed off the area, firing shots into the air to disperse onlookers.

One police recruit, Haitham Fadhel, told reporters that he was knocked unconscious by the blast as he waited to begin a training course.

"We were feeling secure as we were waiting in a well-guarded area," he said. "Before the explosion occurred I heard a loud shout saying 'Stop, stop, where are you going?' Seconds later, a huge explosion shook the area."

The academy, which is in a high-security area near several government ministries, has been targeted in the past by several bombings. But US officials say that overall violence in Iraq has fallen by 90% since the peak of the post-invasion insurgency and is at its lowest level since summer 2003.

About 140,000 US troops are stationed in Iraq, down from a peak of 160,000 during a "surge" ordered last year in an effort by the Bush administration to quell violence.

Between 35,000 and 50,000 are due to remain beyond next year's deadline in non-combat roles, supporting their Iraqi counterparts.

US and Iraqi authorities have agreed to keep the bulk of the existing force in place for parliamentary elections at the end of this year. But two brigades due to depart will not be replaced, leaving alongside support staff and an F16 fighter jet unit.