A garbage truck loaded with explosives blew up next to a Baghdad hotel housing foreigners, killing four people. Thirty US contractors were among the 40 people wounded, the US military said.
Many of the wounded were immediately transported to Baghdad hospitals.
Attackers wearing police uniforms first fatally shot a guard at a gate to the interim Agriculture Ministry, next to al-Sadir hotel. That allowed the garbage truck to enter the car park between the two buildings.
Other guards fired machine guns at the truck in an effort to disable it, police said. The truck stopped just inside the gate and then exploded.
The blast ripped a hole in the car park about 10m across and more than 3m deep, shattering most windows in the hotel and rattling buildings hundreds of metres away.
The US embassy said four of the American contractors wounded in the blast suffered injuries requiring them to be flown to a hospital for treatment.
No Americans were killed.
Al-Qaida claimed responsibility in an internet posting for what it called an attack on the "hotel of the Jews".
"We have fulfilled our vow to take down the Jews and Christians," its military wing said.
A posting purportedly from the group's alleged leader in Iraq Abu Musab al-Zarqawi, responded on the same website that "you have relieved us by killing the enemy of God".
Foreign contractors working in Iraq are regularly targeted by roadside bombs and live in constant fear of abduction and decapitation.
Baghdad residents said the blast
was the most powerful in weeks
In a 30 January report to the US Congress, the special inspector-general for Iraq reconstruction said at least 232 employees of private contractors had been killed in Iraq while working on US military and reconstruction contracts since the ouster of Saddam Hussein.
"Iraq's unsettled security environment continues to present grave risks for contractors and employees," the report said.
Citing US Labour Department figures, it said attacks on work sites and contract employees in Iraq averaged 22 a week, and 728 people had made worker compensation claims for missing more than four days of work because of injuries.
The claims were reported to the Labour Department under the Defence Base Act, which requires all US government contractors to acquire workers' compensation insurance for employees working in Iraq.
Officials said the figures would not be updated again until the next quarterly report in April.
To minimise the risk, contractors live in heavily fortified and bunker-like hotels, often driving in armoured vehicles.
But armed men fighting US forces and allies have responded by devising new ways to get around security and using huge bombs.