Three bomb attacks killed 35 people and wounded dozens more in Iraq on Monday, underscoring the security challenges facing the next US military commander in the country who takes over this week. US Defense Secretary Robert Gates, who earlier arrived in Baghdad on an unannounced visit, said Lieutenant-General Ray Odierno must find ways to keep improving security while American troop levels are falling. Gates will preside over a ceremony on Tuesday to hand command of US-led forces in Iraq to Odierno from General David Petraeus, whose term was marked by a “surge” of 30,000 extra US troops and big falls in violence. In the deadliest attack on Monday, a female suicide bomber killed 22 people and wounded 33 at a dinner celebration attended by police officers in Diyala province, police said. Police said the officers were breaking the fast during the Muslim holy month of Ramadan in Balad Ruz, 90 km (55 miles) northeast of Baghdad. The dead included the town's police chief Lieutenant-Colonel Mohammed Ashraf and 10 other policemen. And in the capital, two car bombs exploded in quick succession, killing 13 people and wounding 37. Despite an increase in deadly attacks in the past few days, overall levels of violence in Iraq are at four-year lows. Gates said the areas in which US forces would be engaged in Iraq would continue to narrow. “The challenge, I think, for General Odierno is: How do we work with the Iraqis to preserve the gains that have already been achieved, expand upon them, even as the numbers of US forces are shrinking?” Gates told reporters on his plane. Iraqi forces have led all big security operations in recent months. The US military is also expected to transfer security control in two more provinces this year, putting Iraqi forces in charge of security in 13 out of the country's 18 regions. Odierno, the deputy US commander in Iraq for 15 months until February, will be promoted to full general on Tuesday. President George W. Bush last week announced that around 8,000 US troops would withdraw from Iraq by early next year, leaving around 138,000 in the country. Many troops who were scheduled to replace those departing from Iraq will now head to Afghanistan, where insurgent violence has grown dramatically in the past two years. He said last week he believed the Iraq war was entering its “endgame”, now that the extra US troops have departed and Iraqi forces are taking more responsibility. “There is no question we will still be engaged,” Gates said. “But the areas in which we are seriously engaged will, I think, continue to narrow.”