BAGHDAD - Twin explosions early Tuesday near a government compound killed at least 22 people and wounded dozens in a rare attack in the Shiite heartland, Iraqi officials said.

The blasts came as Iraq's top political factions started to discuss in earnest whether to ask the U.S. to leave some of its troops to stay beyond the Dec. 31 withdrawal deadline because of the security situation.

While violence is well below what it was during the years that followed the 2003 U.S.-led invasion, militants are still able to launch deadly attacks. The ongoing violence has led to concerns about what happens when the 47,000 remaining U.S. troops are withdrawn.

Still, such violence is rare in the mostly Shiite city of Diwaniyah, which is 130 kilometres outside of Baghdad and well south of most of the insurgent strongholds.

Provincial Gov. Salim Hussein Alwan said he was leaving his house when a suicide bomber rammed into a police checkpoint nearby.

"I was in the garage preparing to leave when the attacker hit the police barrier outside and crashed with their vehicle," Alwan told The Associated Press in a phone interview.

The suicide bomber also crashed into a police vehicle that had munitions inside, said Alwan and Maj. Gen. Othman al-Ghanimy, who commands military operations in Qadisiyah province where Diwaniyah is located. That caused the police vehicle to explode.

But a police officer and a member of the provincial council, Thamir Naji, said there were two suicide bombers driving vehicles who blew themselves up. Conflicting accounts are common in the chaotic aftermath of such attacks. The police official spoke on condition of anonymity because he was not authorized to speak to journalists.

At least 37 people were wounded in the blasts about 7:30 a.m., when security forces were changing shifts, the officials said.

Like most government buildings in Iraq, the governor's house and office are surrounded by walls, and visitors must pass through checkpoints manned by security forces to get inside.

"I had no idea what happened," one security personnel told Iraqiya TV from his bed at the hospital. "I heard only an explosion, flew into the air and went back to ground," he added as his neck and abdomen were bandaged.

No one has claimed responsibility of the attack, but suicide bombings and attacks against Iraqi government facilities are the hallmark of al-Qaida in Iraq. Iraqi officials quickly laid the blame at their doorstep.

"The recent reports indicate that al Qaeda exists in all of the Middle Euphrates provinces, especially in Diwaniyah," al-Ghanimy said, referring to the river that runs south through Iraq. "It is a message to prove that it exists and can reach its targets."

The last major attacks in Diwaniyah was in 2009, when a bomb attached to a bus killed six people, and in 2007, when roadside bomb targeted a police patrol, killing seven officers.

Hamid al-Mutlaq, a Sunni lawmaker and member of the parliament's security and defense committees, blamed Tuesday's attacks on political disputes that have delayed appointments to top security posts.

Iraq's prime minister has failed to fill the top posts at the interior and defense ministries more than five months after he seated his government for a second term. The country's warring political factions have been unable to agree on who should run the powerful and sensitive positions.

"We have said before that there is a failure in the security forces and they are infiltrated," al-Mutlaq said.

In Baghdad, a bomb attached to a minibus killed the driver while the bus was driving Tuesday in the capital's western Harithiya neighborhood, army spokesman Maj. Gen. Qassim al-Mousawi said. It was not immediately known what was the motive was behind the attack.

Also, two soldiers were killed and five other people were wounded when a roadside bomb hit an Iraqi army patrol in Baghdad's eastern Palestine Street, a police officer said.

An al Qaeda-linked group claimed responsibility Tuesday for a brazen attack last week against a government compound in northeastern Iraq. Assailants set off a suicide car bomb and then stormed the compound in Diyala province in an attack that left nine people dead.

The Islamic State of Iraq, a front for al Qaeda in Iraq, has claimed responsibility for a number of similar recent attacks on government facilities.