Iraq’s Interior Ministry said in a statement on Thursday that militants attacked an army camp in Yusifiyah, southwest of Baghdad, earlier in the day.
“Iraqi security forces confronted a failed attempt by Daash gang members to break into a military camp,” said the statement, referring to the Arabic abbreviation of the al-Qaeda-linked group, the Islamic State of Iraq and the Levant (ISIL).
“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,” it added.
The statement also said the soldiers seized 15 rifles and five grenade launchers as well as other equipment.
The clashes followed days of fighting in the Zoba and Zaidan areas west of the capital.
Also on Thursday, a car bomb went off near the northern town of Tuz Khormatu, killing at least four soldiers and injuring 12 others, the town mayor, Shallal Abdul, said.
The attacks were the latest in a surge of violence as Iraq begins preparing for the elections set for April 30.
Some 9,040 candidates are vying for the 328-seat parliament. The next parliament will then elect a new prime minister and president.
Experts and politicians say terrorist groups such as ISIL are coming to Iraq from neighboring Syria and Saudi Arabia to undermine security in the country.
According to reports, more than 2,300 people have been killed in acts of violence in Iraq so far this year.
The United Nations says about 400,000 people have been displaced this year due to the ongoing violence in Anbar, expressing “grave concern” about the presence of al-Qaeda-inspired militants in the western province.