At least 39 people were killed across Iraq on Thursday, mostly in Baghdad, amid a wave of bombings and shootings ahead of a ceremony to mark Iraq taking military command of its forces.
The US military also announced that one of its soldiers was killed on Wednesday in the western city of Ramadi while another died in the northern town of Hawija.
In the deadliest attack on Thursday, a suicide attacker killed 12 policemen and wounded 26, as well another 13 civilians, when he detonated a bomb-laden car near a police fuel depot in Baghdad's Karrada district, said interior ministry spokesman Brigadier General Abdul Karim Khalaf.
"Eighteen vehicles were destroyed of which 12 were civilian cars and the rest belonged to the police," he added.
In another attack, insurgents killed three civilians and wounded 17 people in a roadside bombing near a Sunni mosque in northeast Baghdad, he said.
The attack was against a police patrol near Al-Nida mosque in the largely Shiite Al-Qahira neighborhood, which has been the site of numerous attacks in the past few weeks.
Insurgents also set off a car bomb near a police commando checkpoint close to the central Baghdad Tayran Square on the way to the interior ministry, killing three police and five civilians and wounding 30 people, Khalaf said.
Violence also flared in the restive southern neighbourhood of Dura, which was once one of the most violence places in the capital until it became the focus of joint US-Iraqi military operations.
Two police were killed during a mission against insurgents while four others were injured in a separate incident involving a roadside bomb.
There were also a number of attacks in predominantly Sunni western Baghdad, which has also been a focus of government efforts to pacify the city.
A doctor at the Yarmuk hospital specialising in facial surgery was shot as he made his way to work.
In the Yarmuk neighbourhood a mortar attack injured five policemen, including a colonel, and a roadside bomb targeting an army patrol killed a woman and a soldier and injured three other civilians.
In the upscale Mansur district, also in the west of the city, one civilian was killed when a roadside bomb went off near a restaurant, while in a similar bombing in the area two policemen and two civilians were wounded.
Another three civilians were wounded in another roadside bombing next to a restaurant near Baghdad's Al-Mustansiriyah university, the security official added.
Insurgents have managed to carry out attacks in Baghdad despite a security crackdown in the capital since June 14.
Meanwhile, one police officer was killed and four wounded by a roadside bomb attack east of the oil city of Kirkuk in northern Iraq.
Police also found six corpses in Kirkuk overnight, according to police Colonel Ikram Abdallah.
Gunmen clashed with a police patrol in the northern city of Tikrit, in which a police officer, a policeman and a civilian were killed, according to Salaheddin police.
Northeast of Tikrit, gunmen in cars descended on a police patrol, killing three and wounded four.
In the restive province of Diyala, north of Baghdad, three Iraqis were killed in separate attacks.
A civilian died when his vehicle struck a roadside bomb in Balad Ruz, while two others were killed in separate shootings in the provincial capital of Baquba, where gunmen also set fire to 12 shops in a market, police said.
Meanwhile, three bodies of civilians were fished out from a river near the town of Suweira, south of Baghdad and four corpses were found in various spots in west Baghdad. Another six corpses were found between Tikrit and Kirkuk.
The latest string of bombings came ahead of Thursday's ceremonial start of a handover of Iraq's military command from the US-led forces to Iraqi authorities.