The latest violence is part of a protracted surge in nationwide bloodshed that has left more than 2,400 people dead since the start of the year and sparked fears Iraq is slipping back into the all-out sectarian fighting that plagued it in 2006 and 2007.
In Tuesday's bloodiest incident, soldiers killed 25 militants in an ambush southwest of Baghdad, the capital's security spokesman Brigadier General Saad Maan said.
Maan said the militants were part of the terrorist Islamic State of Iraq and the Levant (ISIL), and that they were planning to attack an army base that they had attempted to hit last week.
Despite the tactical success, the killings illustrate the growing ambition of ISIL militants seeking to fight their way into Baghdad, with analysts and officials worrying that they are seeking to derail April 30 elections.
Elsewhere in Iraq on Tuesday, attacks north of the capital killed 15 people overall, security and medical officials said, including six members of the same family shot dead inside their home on the outskirts of the restive city of Mosul.
A car bomb set off by a suicide attacker at a checkpoint in the city of Tuz Khurmatu killed four policemen, while attacks were also carried out in Baiji and Tikrit in Salaheddin province.
Diplomats and analysts have urged the government to reach out to the Sunni community to undermine support for militancy.
BA/BA