The house explosion happened on 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 Baghdad, 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 levelled 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. On Saturday night, a roadside bomb hit a military patrol in the southern suburbs of Baghdad, killing three soldiers and wounded two, police said.
Medical officials at two Baghdad hospitals confirmed the casualty figures. All officials spoke on condition of anonymity as they weren't authorized to speak to journalists.
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.
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.
The country will hold its first parliamentary elections since the withdrawal of US troops on April 30.