The US military late on Sunday said two dozen soldiers had also been wounded in the clashes with supporters of Shia cleric Muqtada al-Sadr.
The soldiers reportedly died in a battle for control of police and public buildings with the Mahdi Army, al-Sadr's militia, in the Shia suburb of al-Sadr City in Baghdad.
The fierce fighting served grim notice that Shias in Iraq might have finally turned their ire on US-led occupation soldiers.
"Specifically, the militia attempted to occupy and gain control of police stations and government buildings. During the attack, this illegal militia engaged coalition forces and Iraqi security forces with small arms fire and rocket-propelled grenades," the US military statement said.
"Coalition forces and Iraqi security forces prevented this effort and reestablished security in Baghdad at the cost of seven US soldiers killed and more than two dozen wounded," it added.
A Humvee vehicle was destroyed and set on fire and US troops evacuated another from al-Dakhil neighbourhood of al-Sadr City.
Two loud explosions were heard in the area as US soldiers traded fire with angry Shia in Suq Mraidi and al-Dakhil neighbourhoods of central al-Sadr City.
The deaths capped an extremely violent day in Iraq, which also saw 20 killed and more than 100 injured in clashes between Spanish-led occupation troops and Shia demonstrators in Najaf.
Two occupation soldiers – one from EL Salvador and the other from the US - also died in the clashes.
The demonstrators were protesting against the detention of one of the top aides of al-Sadr.