Police said the attack in the commercial Shab neighbourhood began when gunmen shot five guards at an open-air car park that served as a small market.
As bystanders rushed to the scene, a car bomb detonated next to an oil tanker, which exploded and engulfed the area in a fireball.
The ground was littered with remnants of the charred vehicle and sandals and clothes of the many dead and at least 37 injured.
The motive for the attack, which appeared to be intended to kill as many people as possible, was unclear, but it may have been sectarian. The Shab neighbourhood is mainly Shia.
In other unrest on Tuesday, fighting between suspected insurgents and Iraqi police killed at least six civilians in Baghdad, and officials said roadside bombs had killed three US soldiers.
The shootout in Baghdad broke out in the late morning between gunmen riding in three cars and Iraqi police in Dora, one of Baghdad's most violent neighbourhoods.
Dozens were wounded in the
Shab market attack
The six civilians were killed in the crossfire, said an Iraqi police official.
Elsewhere, a US soldier died when a roadside bomb exploded near al-Rasheed airfield, a former Iraqi air force installation in southern Baghdad, damaging a Humvee and also wounding an Iraqi civilian, said another Iraqi police official.
Two other soldiers were killed when their vehicle struck a roadside bomb near Balad, 50 miles north of Baghdad.
The attacks raised to at least 2,448 the number of members of the US military who have died since the start of the war in 2003, according to count by the Associated Press.
Meanwhile, another roadside bomb destroyed a liquor store in the Iraqi capital in what appeared to be the third attack on the shop by militants determined to impose Islamic customs by closing down such establishments.
None of the stores in Baghdad's Karradah shopping district had opened yet, and the blast caused no casualties, police said.
Some Muslim religious leaders in Iraq have tried to ban the drinking of alcohol, even though it is legal under the country's new constitution.
In other developments on Tuesday, Iraq's interior ministry announced that it had arrested two members of al-Qaeda in Iraq.
It named the men as Salah Hussein Abdul-Razzaq, captured in Ramadi and Omar Ahmed Salah, held in Baghdad.