The explosion, two weeks before the United States army formally hands over remaining frontline functions to the Iraqi security forces, was the most lethal single attack in the country this year.
It marks a resumption of a previously successful tactic aimed at discouraging Iraqis from joining the police and army.
Last month, 43 people were killed in a bombing which struck a wages queue of members of a government-run militia used to combat al-Qaeda in Sunni areas of the country.
In the most recent incident, potential recruits were lining up outside a centre established at the Saddam Hussein-era defence ministry building in the centre of Baghdad. They were being allowed in 250 at a time, making the recruits and the monitoring soldiers and officers an easy target.
Some reports said the attack, at around 7.30 on Tuesday morning, may have involved two men.
"After the explosion, everyone ran away, and the soldiers fired into the air," said Ahmed Kadhim, 19, a recruit who was unharmed.
"I saw dozens of people lying on the ground, some of them were on fire.
Others were running with blood pouring out."
By mid-morning, the Baghdad authorities had confirmed 39 dead, but the city morgue said it had already received 59 bodies. Sources said more than 120 were wounded.
Although the American military "surge" of 2008, combined with the success of the Sunni militias, drastically reduced the scale of the insurgency in Iraq, there has been a rise in violence as the time for US withdrawal approaches.
The fact that Baghdad's intensive security has failed to stop regular major suicide attacks has particularly worried the authorities.
Last week, Lt Gen Babaker Zebari, the Iraqi chief of staff, warned that his troops might not be ready to assume full responsibility for the nation's defences till 2020. The police are said to be even less well-prepared, though American senior officers say the overall level of training is adequate.
Failure by the major political parties to agree terms for a coalition government five months after a inconclusive general election in March has contributed to the unease. If Iraqiya, a cross-sectarian grouping that won the support of most Sunnis, is excluded from senior positions the level of disillusionment in the militias is likely to rise.
There have been reports that al-Qaeda has offered members higher wages to defect.
From September 1, the number of American troops in Iraq will be reduced to 50,000, in support and training roles. A final pull-out is scheduled for the end of 2011.