The attacker blew himself up while in the midst of a crowd of recruits about 10 a.m. in Abu Ghraib, a town on the western outskirts of the capital, police said. Those killed included five soldiers and 10 recruits, police said, adding that 22 people were wounded.
Witnesses say guards spotted the bomber but were unable to prevent him from detonating his explosives.
Nobody has claimed responsibility for the attack, but Iraqi security forces are frequently targeted by Sunni insurgents who accuse them of collaborating with U.S.-led efforts to stabilize the country.
In other news, residents and police in a Shiite area in eastern Baghdad said U.S. helicopters fired on three houses early on Saturday, killing six men and wounding a woman and five children.
The U.S. military said a helicopter supporting ground operations in the area was attacked with small-arms fire but "did not return fire."
AP Television News footage showed a shattered wall of one house and a satellite dish punctured by large holes apparently caused by artillery.
A resident said four men were killed as they slept, conflicting with reports that six were killed. There was no immediate reason for the discrepancy in reports of casualties.
"There was a U.S. helicopter flying overhead and it suddenly opened fire on the houses," the resident said.
Dozens of people marched in a funeral procession for four of those reportedly killed in the alleged attack, bearing their bodies in wooden coffins draped with Iraqi flags.
Meanwhile, five Iraqi police officers were slain and their bullet-riddled bodies dumped in a deserted field in central Iraq, police said on Saturday.
The bodies of the five men, who were dressed in civilian clothes, were discovered late on Friday outside the city of Beiji, 250 kilometres north of Baghdad, police said.
Their identification showed they were from the turbulent city of Ramadi, police said.