"We did have soldiers killed in northern Baghdad," Major Darryl Wright said, adding that the deaths were the result of an improvised explosive device, US military jargon for a roadside bombing.
The attack came as the soldiers were on a foot patrol in the town of Tarmiya, 20km north of the capital.
Two residents of the town, including an Associated Press reporter who rushed to the scene after the blast, saw about a dozen injured US soldiers lying on blood-splattered ground after the attack.
"I was heading to our home [when] there was a group of American soldiers walking in the road while around five Humvees were parking behind them," Walid Nahid, 35, who lives in the area, said. "I heard a very loud explosion and I saw bodies flying."
According to Nahid, who said he was about 200 metres away, "there were explosives hidden among the palm trees overlooking the street".
Eight US soldiers were wounded
in addition to the three fatalities
Nahid and Ala Nagy, 22, who works as a guard for a factory nearby, both said helicopters landed in the area within 15 minutes of the explosion and removed the casualties for treatment.
Both said they heard gunfire after the incidents.
The road was immediately blocked off by Iraqi security forces and US troops.
Polish soldier killedWestern offensive
Meanwhile, a Polish armoured vehicle crashed into an Iraqi bus, killing one Polish soldier and injuring four other troops southeast of the capital, the US-led military said.
The accident occurred near Diwaniyah, about 160 km southeast of Baghdad, the military said in a statement.
There was no word on whether there were any Iraqi casualties in the crash. The injured Polish soldiers, in stable condition, were evacuated to a hospital in Baghdad.
Earlier, the US military reported that a US marine had been killed as US and Iraqi forces continued their offensive in western Iraq.
US troops have stepped up
offensive in al-Anbar province
The marine was killed on Thursday during "security and stability operations", the US military said on Friday, without giving further details.
US and Iraqi forces began their offensive on Sunday in an effort to end resistance in Iraq's vast western desert province of al-Anbar, one of the most lawless areas of the country.
They stepped up operations on Thursday, using warplanes and an AC-130 gunship to attack fighters in the town of Haqlaniya, about 240km northwest of Baghdad.
More than 100 suspected fighters have been arrested since the offensive began, and at least three US marines have died.
The latest figures raise to 1494 the number of US soldiers killed in Iraq since the US-led invasion in March 2003.