The firefight in the town of Yusifiyah also left one army officer dead, the statement said, adding that two heavy machineguns, 15 rifles and five grenade launchers were seized, along with other equipment.
"Iraqi security forces confronted a failed attempt by Daash gang members to break into a military camp," the statement said, referring to the Arabic abbreviation for the Islamic State of Iraq and the Levant militant group.
"The security forces ... killed more than 40 terrorist attackers, and the attack resulted in the death of one of our officers when he was confronting these criminal gangs."
The clashes in Yusifiyah come after days of fighting in the Zoba and Zaidan areas west of Baghdad, spurring concerns that militants who have for months controlled the town of Fallujah could be looking to open a new front to encroach on the capital.
NJF/NJF