Later reports quoting police said that some of the victims had suffered broken arms and legs, indicating they had been tortured before they were shot.
One witness said many of the victims were so badly brutalised that they were "beyond recognition".
Major General Qassim al-Moussawi, a Baghdad security spokesman, said some of the victims were members of the Iraqi security forces and others of the Awakening Councils, also known as the sahwa or Sons of Iraq - Sunni fighters who have allied with US forces to fight al-Qaeda.
He said authorities had arrested 25 people and sealed off the area to conduct a search for other suspects.
Seven people were left alive with their hands tied behind their backs after the attack, he said.
Saad al-Muyalibi, an Iraqi government adviser, told Al Jazeera that the killings "could be political, but not linked to the results of [the] elections".
"We are trying to investigate the background of the people who were murdered and was it al-Qaeda or was [it] a tribal thing, It's [too] early to say," he said.
"We are not ruling out any possibility, but the initial view [is] that it could be al-Qaeda. Most likely al-Qaeda continues its attacks on government installation and on the Sons of Iraq, the sahwa members."
Al Jazeera's Zeina Khodr, reporting from Baghdad, said the Rasheed district used to be an al-Qaeda stronghold until the Awakening Council clamped down on the fighters.
"[Awakening Council members] are targets, just like security officials, government officials."
She said the attack came in a time of political uncertainty with no clear winner emerging from the March 7 national elections and the political parties still negotiating to form alliances.
"A lot of discussion has taken place but still no progress. So, a lot of tension and speculation that the post-election period might see an upsurge in violence.
"It could be the Iraqi style of negotiating. This is what you hear when you talk to people here. They are expecting violence, maybe to step up pressure."