There was no immediate claim of responsibility for the blasts, Reuters reported.
Soldiers and security personnel are prime targets for militants seeking to destabilize the Iraqi government.
The deadly attack on Sunday took place when a man driving a car blew himself up outside a government bank where soldiers were waiting to collect their salaries, police said. Twelve people were killed.
A further 37 people died in apparently coordinated blasts in and around Baghdad on Sunday. In the worst of those, two car bombs exploded moments apart near a busy market in the town of Nahrawan, south of the capital, killing seven.
"I was eating my breakfast when a powerful blast shook the building, shattering the window of my apartment and covering the dining table with pieces of glass," said Suad Ahmed, a woman living in Baladiyat, where another car bomb killed three people.
"I was terrified, I heard women and children shouting next door. I started to cry. I was afraid of death."
Al-Qaeda was forced underground in 2007 and violence eased in the following years, but is now on the rise again, with around 3,000 civilians killed so far this year, according to monitoring group Iraq Body Count.
Insurgents have exploited growing anger among Iraq's Sunni minority, which complains it has been marginalized under the Shia-led government that came to power following the U.S.-led invasion in 2003.
A raid on a Sunni protest camp in April touched off a violent backlash by militants that is still ongoing.
Al-Qaeda's Syrian and Iraqi affiliates merged earlier this year to form The Islamic State in Iraq and the Levant, which has claimed responsibility for attacks on both sides of the border.
HH/HH