An attack on a mall in Baghdad on Monday that left at least 12 people dead has ended.

"The security forces are now fully in control, the gunmen have been killed and the hostages have been freed," a senior police officer said. 

Gunmen set off a car bomb at the entrance to a mall in mainly Shiite eastern Baghdad, killing at least 12 people and wounding 25 as the attackers raced inside and took hostages, Iraqi officials said.

The attack occurred in the evening when a group of gunmen blew up some bombs and opened fire at the entrance of al-Jawhara Mall in Baghdad's al-Jadida district before they entered the shopping centre and took a number of people hostage, the source told Xinhua on condition of anonymity.

Baghdad Operations Command, which is responsible for the security in the Iraqi capital, arrived at the scene while security forces sealed off the district and evacuated several surrounding buildings, the source said without giving further details about the whether there were suicide bombers among the attackers and how many people so far were killed and wounded.