Militants have flown an al Qaida flag over a Baghdad town after killing 16 security officials and burning some of their bodies.
The incident in Azamiyah served as a grim reminder of continued insurgent strength in Iraq's capital.
It was the bloodiest attack in a day that included the deaths of 23 Iraqi soldiers, policemen and other security forces across the country who were targeted by shootings and roadside bombs.
The mayhem served as a stark warning that insurgents are trying to make a comeback three months after their two top leaders were killed in an airstrike on their safehouse, and as the US military presence decreases.
The complex attack began when militants struck a checkpoint in the largely Sunni neighbourhood of Azamiyah, once a stronghold of insurgents that in recent years has become more peaceful.
Then the militants set it on fire, burning several of the soldiers' bodies, according to an army officer who was on patrol in the area. Minutes later, attackers detonated three roadside bombs. Police and army officials said between 16 and 20 assailants took part in the highly orchestrated attack - all appeared to have escaped.
An hour before the Azamiyah attack, US Vice President Joe Biden predicted there would not be an extreme outbreak of sectarian violence in Iraq as all but 50,000 US forces leave the country at the end of August.
Mr Biden said the American troops left behind would be more than enough to help Iraqi forces maintain security.
The Obama administration is keeping a wary eye on Iraq's security. White House officials said Mr Biden is sending two of his top national security advisers to Baghdad this weekend to help progress Iraq's stalled political process in a sign of impatience and concern that sectarian tensions could escalate as the Americans forces withdraw.
It has been more than four months since Iraq's March 7 election, with little indication that a government can be formed before the Muslim holiday of Ramadan begins in the middle of August and brings a halt to business in much of the Middle East.