A suicide bombing on a bus in Baghdad has killed at least 12 Iraqis.
A bomb attack on a restaurant in Mosul killed at least five
Eleven people have died in other violence, including a restaurant bombing in the northern city of Mosul.
In a separate development, the US has threatened to cut aid to Iraq if the new government includes politicians with a sectarian bias.
US ambassador Zalmay Khalilzad was speaking after talks to form a new government faltered over divisions between Shias, Sunni Arabs and Kurds.
"Sectarian and ethnic conflict is the fundamental problem in Iraq," he said.
Spate of attacks
The Baghdad bus attack occurred in Kadhimiya, a Shia-dominated area of northern Baghdad, at about midday local time (0900 GMT). Eight people were also injured in the attack.
One report spoke of rescue workers pulling charred corpses out of the wreckage of the mini-bus.
At least five people have been killed in a bomb attack on a restaurant in the northern city of Mosul, police and medics said.
At least one policeman was among the dead at the Abu Ali restaurant which is located near the police headquarters.
Police said that a man had eaten his breakfast before placing a bag under the counter and walking out.
Five lorry drivers were reported killed when their convoy carrying building materials came under rocket and automatic weapons fire north of Baghdad, police said.
A civilian driving in his car was also killed in an ambush in Balad, north of Baghdad.
The US ambassador to Iraq said the US would not continue spending billions of dollars to build up security forces run by people with a sectarian agenda.
"American taxpayers expect their money to be spent properly. We are not going to invest the resources of the American people into forces run by people who are sectarian," he said at a rare news conference.
Mr Khalilzad bluntly warned politicians from Iraq's largest group, the Shia Muslims, that the key defence and interior ministries must be in the hands of people "who are non-sectarian, broadly acceptable and who are not tied to militias".
Sunni Arabs leaders accuse the Shia-led interior ministry of employing militias to oppress their civilians under the guise of fighting the insurgency.
Mainly-Sunni insurgents have launched tens of thousands of attacks on US forces, their allies and targets associated with the new regime established since the US overthrow of Saddam Hussein nearly three years ago.
Mr Khalilzad said it was time for Iraqis to heal sectarian and ethnic differences and form a government of national unity that is not dominated by Shia Muslims and Kurds.
Shia leaders say they have the right to control key offices in the government after winning 130 of the 275 seats in parliament in a vote on 15 December.
Political leaders have yet to start serious talks on forming a new government and correspondents say negotiations full of sectarian obstacles could last for months.