The house explosion happened Saturday afternoon when a group of soldiers searched a farmhouse in Garma, an area near the city of Fallujah, 65 kilometres west of the capital, police said. Minutes later, police said gunmen opened fire on arriving soldiers.
The blast and clashes killed 15 soldiers and wounded 24, as well as leveled the home, officials said.
In other attacks, police said a roadside bomb targeting a military convoy killed three soldiers and wounded seven just north of Baghdad. Saturday night, a roadside bomb hit a military patrol in the southern suburbs of Baghdad, killing three soldiers and wounded two, police said.
Al-Qaeda-inspired militants took control of Fallujah and parts of Ramadi in late December, taking advantage of a months-long surge in Sunni discontent against al-Maliki's government.
Also Read
The takeover was sparked when security forces arrested a Sunni lawmaker sought on terrorism charges, then dismantled a year-old Sunni anti-government protest camp. They later pulled out of the area to calm angry residents, allowing the militants to take control.
Violence has been escalating in Iraq. Last year, Iraq saw its highest death toll since the worst of the country's sectarian bloodletting began to subside in 2007, according to United Nations figures.