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 Abu Ghraib and Taji jails after months of preparation.
Monday's attack came exactly a year after the leader of al Qaeda's Iraqi branch, Abu Bakr al-Baghdadi, launched a campaign dubbed "Breaking the Walls" that made freeing its imprisoned members its top priority.
Sunni Islamist militants have in recent months been regaining momentum in their insurgency against Iraq's Shi'ite-led government, which came to power after the U.S. invasion to oust Saddam Hussein.
"In response to the call of the mujahid (holy warrior) Sheikh Abu Bakr al-Baghdadi to seal the blessed plan of "Breaking the Walls"... the mujahideen brigades set off after months of preparation and planning to target two of the biggest prisons of the Safavid government," read the statement.
Safavid is a reference to the dynasty that ruled Iran from the 16th to 18th centuries and is used by hardline Sunnis as a derogatory term for Shi'ite Muslims.