The troops, backed by international and Iraqi aircraft clashed with the IS militants near the IS-held town of Garma, some 50 km west of Baghdad, leaving 12 militants killed, the defense ministry said in a statement, Xinhua reported.
The battle also destroyed eight IS positions and five vehicles, including three booby-trapped ones, the statement said.
Meanwhile, the troops and the militias, also known as Hashd Shaabi, or popular mobilization, killed 25 more extremist militants in an operation near Tarmiyah area, some 40 km north of Baghdad, the statement added.
During the operation, the troops defused three booby-trapped houses and seven roadside bombs, along with arresting 17 suspected terrorists, it said.
In addition, the security forces separately seized two large caches of weapons, explosives and ammunition in the areas of Abu Ghraib, just west of Baghdad, and near the town of Garma, it added.
In another statement, the ministry said that the troops killed three IS militants and destroyed their vehicle near Husaiba al-Sharqiyah area.
The troops also captured ten wanted individuals for suspected terror acts in the towns of Ameriyat al-Fallujah and Habbaniyah, the statement added.
The IS group has seized most of Anbar province and tried to advance towards Baghdad during the past few months, but several counter attacks by security forces and Shiite militias have pushed them back.
The security situation in Iraq has drastically deteriorated since June last year, when bloody clashes broke out between Iraqi security forces and IS militants, who took control of the country s northern city of Mosul and later seized swathes of territories after Iraqi security forces abandoned their posts in Nineveh and other predominantly Sunni provinces.