A fire at a women's shelter in Iraq's capital has killed several lodgers, according to police, who gave conflicting accounts of the tragedy.

Mohammed Jihad, Baghdad's police lieutenant colonel, called the incident a "group suicide" caused by women rioting in the shelter on Friday.

Briefing reporters outside the Dar al-Zuhur shelter, he said several women were suffering from a "deteriorating mental state" and rioted, leading to the fire that killed six women.

But another officer at the Rusafa police district, where the shelter is located, told The Associated Press that the fire started in the kitchen after lodgers got into a fight.

The officer, who asked that his name be withheld in line with police regulations, said two women died from stab wounds and seven perished in the fire.

Twenty-two others were being treated for injuries at two nearby hospitals.

Police barred reporters from going inside the shelter, located in Baghdad's northern Azamiyah area.

The shelter, run by the Labour and Social Affairs Ministry's Office for Rehabilitation, houses homeless women and those with children born out of wedlock.

The women who were not caught up in Friday's violence were transferred to another building run by the social affairs ministry, the social affairs ministry said in a statement.

Authorities have opened an investigation to determine the circumstances of the clashes and fire.