Another suicide bomber targeted a gathering of Sunni militia leaders, pushing the death toll to at least 50.
The first attack was the deadliest this year against the groups that turned against al-Qaida, as insurgents try to undermine confidence in the government and its allies.
The first attack took place at a checkpoint near a military base in the mostly Sunni district of Radwaniya southwest of Baghdad.
Some 150 Sunni fighters had lined up to collect their wages when the bomber struck, according to witnesses.
"I ran, thinking that I was a dead man," said Uday Khamis, 24, speaking outside the Mahmoudiyah hospital where many of the wounded were taken. His left hand was bandaged and his clothes were stained with blood.
At least a dozen men, dressed in military-style uniforms were seen laying in pools of blood in front of a blast wall.
There were conflicting reports as to how many of the dead were Iraqi soldiers and whether accountants who were killed as they were handing out money were civilian or military.
In the second attack, a suspected militant stormed into a local Awakening Council headquarters in the far western town of Qaim near the Syrian border and opened fire on those inside.
The town and the vast desert province of Anbar, were for years at the centre of the Sunni Arab insurgency and a sanctuary for al-Qaida.
The fighters returned fire, wounding the attacker, who then blew himself up as they gathered around him, killing three and wounding six others.
Two other members of the Sunni militia were also wounded in minor attacks south of Baghdad.
While violence has dropped dramatically over the past two years, Iraqi security forces remain a favourite target for insurgents trying to destabilise the country and its Shiite-led government.
The complaints take on greater urgency given Iraq's current political stalemate and the scheduled withdrawal of all US combat forces by the end of August.
More than four months after March's inconclusive parliamentary election, Iraq has yet to form a new government as politicians bicker over who will lead the country.
The impasse has raised fears that militants will try to exploit the political vacuum to re-ignite sectarian tensions that brought Iraq to the brink of civil war in 2006 and 2007.
Meanwhile, in Afghanistan explosives smuggled into a prison killed a guard and allowed 11 inmates to escape. One prisoner was shot and killed while fleeing.
A Taliban spokesman claimed responsibility for the jailbreak, saying it freed insurgent comrades being held there.
The explosives detonated shortly after 2am on Saturday, destroying a gate and allowing 23 prisoners to flee the building.
One prisoner died and three were wounded in an ensuing gun battle with guards. Eight other inmates were recaptured, but 11 escaped.
General Abdul Makhtar,
of Afghanistan's prison department, said one guard was
"The prisoners managed somehow to bring explosives inside the prison," Gen Rasouli said. "It was a strong explosion. Everything was set up from inside the prison."
He said 347 prisoners were being held in a building meant for only 86.
A Taliban spokesman claimed responsibility for the jailbreak, saying "all of our mujahedeen" were freed and claiming 15 prison guards were killed.
In June 2008, the Taliban staged a sophisticated jailbreak that freed nearly 900 prisoners