BAGHDAD: An al Qaeda front group has claimed responsibility for jail breaks to release hundreds of militants which left more than 40 people dead and further eroded confidence in the government.
Separately 12 people were killed and 49 wounded in a series of bombings which targeted worshippers gathered for evening prayers at four Sunni mosques on Tuesday.
The bloodshed added to July's soaring death toll, which stands at 638, the highest monthly figure in a year marked by spiraling violence.
Another 1,445 people were wounded through July 23, according to AFP figures based on reports from security and medical sources.
Both Sunni and Shia places of worship have been attacked in recent months, raising fears of a return to the all-out sectarian conflict that killed tens of thousands of people in past years.
The prison breakouts in Abu Ghraib, west of Baghdad, and Taji, north of the capital on Monday, illustrated both the growing reach of militants and the deteriorating security situation in Iraq.
"The warriors, after months of preparation and planning, targeted two of the largest prisons of the Safavid government," said a statement signed by the Islamic State of Iraq and the Levant, using a pejorative term for Shias.
The group was created by a merger of al Qaeda's Iraqi branch and the Syrian al Nusra Front.
Its statement released Tuesday said that "hundreds" of inmates, among them 500 militants, were freed in the attacks.
It also said the operation was the final one in a campaign aimed at freeing prisoners and targeting justice system officials, which was called for in an audio statement attributed to the group's leader, Abu Bakr al Baghdadi, and last year.
"Dark days are waiting for Iraq. Some of those who escaped are senior leaders of al Qaeda, and the operation was executed for this group of leaders," a senior security official told AFP on condition of anonymity.
"Those who escaped will work on committing acts of revenge, most of which might be suicide attacks."
In what appears to have been a carefully planned operation, militants waiting outside the prisons launched their attacks after inmates began rioting.
Militants then attacked with mortar rounds, bombs and gunfire, sparking clashes with security forces that raged for 10 hours.
At least 20 security forces members and 21 inmates died.
Officials have declared "a curfew around the two prisons, where ongoing search operations are being conducted," justice ministry spokesman Wissam al Fraiji told AFP.
Fraiji said 108 escaped prisoners had been recaptured, and reinforcements from the interior and justice ministries have been sent to the two prisons.
MP Hakem al Zamili, a member of parliament's security and defense committee, confirmed senior al Qaeda members had escaped, and expressed fear they would return to haunt Iraq.
"These terrorists will go to Syria to return to the al Qaeda organization and return again to Iraq to carry out terrorist attacks against the Iraqi people," he said.
Al Qaeda-linked fighters are among those battling the regime of President Bashar al Assad in Syria, which shares a long border with Iraq.
The conflict pits mainly Sunni rebels against Assad, a member of the Alawite sect, which is an offshoot of Shia.
It has spilled over the border and raised tensions in Iraq. Both Iraqi Sunnis and Shias have travelled to Syria to fight.
The prison escapes and mosque bombings illustrated the woeful security situation in Iraq and threaten to undermine confidence in the government.
"The escape of prisoners in this organized way from the biggest prisons in Iraq is another sign of the deterioration of security in Iraq in general, and Baghdad in particular," said Hamid Fadhel, a Baghdad University political science professor.
The series of bombings on Tuesday night targeted worshippers gathered for evening prayers at four Sunni mosques.
A bomb exploded in the Omar bin Abdulaziz Mosque in the northern city of Kirkuk, while another blast struck near Al-Salihin Mosque close by.
And two bombs were detonated near Ahmed al Mukhtar Mosque in the Dura area of south Baghdad, while a car bomb went off near al Imam Ali Mosque in Kut.
Special extended evening prayers are held during the month of Ramazan, which began two weeks ago.
Other violence in the Nineveh and Kirkuk provinces in north Iraq and Diyala and Salaheddin provinces to the north of Baghdad killed 16 people, among them seven police, and wounded eight.
Iraq has faced years of attacks by militants, but analysts say widespread discontent among members of its Sunni Arab minority that the government has failed to address has fuelled the surge in unrest this year.
Sunni Arabs accuse the Shia-led government of marginalising and targeting their community, including through unwarranted arrests and terrorism charges.