At least 29 people have been shot dead in the Iraqi capital Baghdad in a building that police believe was being used as a brothel.

Twenty of them were said to be women.

Gunmen carried out the raid on two rundown apartments in a housing complex in the east of the city on Saturday evening.

A police officer told Reuters that the words: "This is the punishment of those practising prostitution" were scrawled in black on the walls on at least one of the flats where the bodies of the women were found.

Shia militia members have been accused by locals of carrying out killings of women branded as prostitutes in that district of Baghdad.

At least 18 people were wounded, police said.

Image Caption:The apartment block where the attacks took place

The attack happened in Zayouna neighbourhood and local people said it was was carried out by men wearing a mix of plain clothes and camouflage.

The exact number killed has yet to be confirmed but some locally said the figure could be much higher.

Dhafir Abdullah, a local resident said: "While I was having a picnic at 8.30pm yesterday, I saw police vehicles parked. Then I heard that 35 women were killed in vague circumstances."

Video footage of the scene showed bloodstains on the path leading to the apartment doorways and discarded clothing and medical equipment left by the emergency services.