BAGHDAD: Islamic State militants attacked Iraqi security forces on the western outskirts of Baghdad on Sunday in their largest assault near the capital for months, while two suicide blasts in a mainly Shi'ite district killed 31 people.
Suicide bombers and gunmen in vehicles and on foot launched the attack on Abu Ghraib at dawn, seizing positions in a grain silo and a cemetery, and killing at least 17 members of the security forces, officials said.
Fighting was still raging at the silo site on Sunday evening, security officials said.
Security officials blamed Islamic State, and a news agency that supports the group said it had launched a "wide attack" in Abu Ghraib, 25 km (15 miles) from the centre of Baghdad and next to the international airport.
Iraqi forces backed by U.S.-led coalition airstrikes have driven Islamic State back recently in western Anbar province and are preparing for an offensive to retake the northern city of Mosul, but the militants are still able to strike in Baghdad and other cities outside their main areas of control.
Later on Sunday, two suicide bombers riding motorcycles blew themselves up in a crowded mobile phone market in the Shi'ite Sadr City district, wounding more than 60 people in addition to the dead, police and medical sources said.
A Reuters witness saw pools of blood on the ground with slippers, shoes and mobile phones at the site of the blast, which was sealed off to prevent further attacks.
In a statement circulated online, Islamic State said two suicide bombers had carried out the attack, killing and wounding "hundreds of polytheist rejectionists", as the ultra-hardline Sunni group refers to Shi'ite Muslims.
Baghdad-based security analyst Jasim al-Bahadli said Sunday's attacks suggested it was premature to declare that Islamic State was losing the initiative in Iraq.
"Government forces must do a better job repelling attacks launched by Daesh. What happened today could be a setback for the security forces," he said, using an Arabic acronym for Islamic State.
In Abu Ghraib, a curfew was imposed as a regiment of Iraq's elite counter-terrorism forces was mobilised to retake the silo and prevent the militants approaching the nearby airport, security officials said.
Army and police sources said the militants had attacked from the nearby Islamic State-controlled areas of Garma and Falluja, driving Humvees and pickup trucks fixed with machine guns.
The Amaq news agency said Iraqi forces had been forced to retreat from several locations. But the Iraqi security sources said the militants had been pushed out of a police station and several army positions and had dug in at the cemetery and the silo, part of which was set on fire.
Iraqi army helicopters began bombarding Islamic State positions in the silo and the cemetery, a military statement said.
Interior Ministry spokesman Brigadier General Saad Maan said at least 20 militants had been killed so far in the government's counter offensive.
Fighters from the Hashid Shaabi, a coalition of mainly Iranian-backed Shi'ite militias, were mobilised to Abu Ghraib to reinforce regular government forces in the area, said Jawad al-Tulaibawi, a local Hashid commander.
Powerful Shi'ite cleric Moqtada al-Sadr also called on fighters loyal to him to be on alert to protect Baghdad. Shi'ite militias like Sadr's 'Peace Brigades' were seen as a bulwark against Islamic State's sweeping advance in 2014 which threatened Iraq's capital and its most sacred Shi'ite shrines.