The blast went off about 8:30 p.m. in an area filled with shops and restaurants, many of them packed with people out for the evening during Ramadan festivities, Lt. Col. Karim al-Zaidi.
Al-Zaidi, who said 20 were killed and 40 were wounded, added that the number of deaths was expected to rise.
Witnesses reported scenes of chaos and rescue vehicles raced to the scene. Dazed survivors, their clothing stained with blood, stumbled in the darkness or wept in despair.
Body parts could be seen on the street, the witnesses said.
Also Monday, six American soldiers were killed in separate attacks and U.S. military officials said a Marine died in action the day before.
The deaths made October the deadliest month for U.S. troops in Iraq since January.
In other developments:
In the worst attack Monday against U.S. troops, four Task Force Baghdad soldiers died when their patrol struck a roadside bomb in Youssifiyah, 12 miles south of Baghdad, the military said.
Two other soldiers from the 29th Brigade Combat Team were also killed in a bombing Monday near Balad, 50 miles north of Baghdad. The U.S. military also said a Marine was killed Sunday near Amiriyah, 25 miles west of Baghdad.
Those deaths raised the death toll for October to more than 90, the highest monthly total since January when 107 American service members died. The latest deaths brought to 2,025 the number of U.S. service members who have died since the Iraq war began in March 2003.
Elsewhere, U.S. jets bombed two insurgent "safe houses" near the Syrian border Monday in an attack aimed at al Qaeda in Iraq, and coalition forces swept through several areas of Baghdad, taking nearly 100 suspected militants into custody, the U.S. command said.
Two separate mortar attacks in Baghdad and northern Iraq killed three people and wounded 11.