Al-Qaeda has claimed responsibility for raids on prisons in Iraq in which 500 inmates were freed.

Hundreds of convicts, including senior members of al-Qaeda, broke out of Iraq's Abu Ghraib jail after comrades launched a military-style assault to free them.

Suicide bombers drove cars packed with explosives to the gates of the prison on the outskirts of Baghdad.

Other militants took up positions near the main road, fighting off security reinforcements sent from Baghdad, as several others wearing suicide vests entered the prison on foot to help free the inmates.

Hundreds of prisoners succeeded in fleeing the prison, which became notorious a decade ago by photographs showing abuse of prisoners by US soldiers.

"The number of escaped inmates has reached 500, most of them were convicted senior members of al-Qaeda and had received death sentences," Hakim Al-Zamili, a senior member of the security and defence committee in parliament, said.

A simultaneous attack on another prison in Taji, around 20km north of Baghdad, followed a similar pattern.

Guards managed to prevent any inmates escaping, however 16  soldiers and six militants were killed.

The Islamic State of Iraq and the Levant, which was formed earlier this year through a merger between al-Qaeda's affiliates in Syria and Iraq, said it had carried out the attacks on the jails after months of preparation.