After detonating the bomb then opening fire on crowds, the gunmen holed up in the shopping center in the Baghdad al-Jadida district, amid fears they were wearing suicide belts.
However, Iraqi commandos landed on the roof, where they clashed with attackers inside, killing two and arresting another four.
ISIS has now claimed responsibility for the attack, which would mark a step up in coordination for an attack in Baghdad, which ISIS has previously only subjected to crude suicide bombings.
A police official said the attackers entered the mall and when security forces got too close, they killed three hostages.
He described the mall as a building of four or five floors in a busy commercial area of Baghdad, in a populous Shiite-majority area on the eastern edge of the Iraqi capital.
A large plume of black smoke could be seen billowing into the sky above the area where the mall was located.
Police said a counter-terrorism force from the intelligence services was dispatched and snipers posted on buildings around the mall.
An interior ministry source said the gunmen opened fire in the street after a car bomb exploded at the entrance to the mall and briefly clashed with members of the security forces before entering.
ISIS has carried out dozens of suicide car bomb attacks but Monday’s hostage-taking would be the first of its kind since ISIS seized control of large parts of Iraq in 2014.
The spokesman for Baghdad Operations Command, Saad Maan, claimed the attack was over and the security forces “in full control of the situation” but other security sources insisted the standoff was ongoing.
“There is a major security deployment around the scene of the attack. Most of the main roads in this part of Baghdad have been closed,” the police colonel said.
ISIS has suffered a number of military setbacks across Iraq in the past year. Security officials say fierce battles and relentless airstrikes have depleted its manpower.
Analysts see that a reason for the drop in attacks targeting civilians in the capital which were an almost daily occurrence two years ago.
The Iraqi intelligence services announced on December they had detained 40 ISIS members as part of major swoop in the Baghdad area.
They described the arrests as the continuation of an operation that saw them bust a car bomb-making cell in Baghdad earlier in 2015, Daily Mail reported.
S/SH