Security forces have foiled an attack by armed men on two prisons near Baghdad, the Iraqi interior ministry said, while online comments from jihadists on Monday claimed that thousands of prisoners had escaped.
The attacks targeted prisons in Taji, north of Baghdad, and Abu Ghraib to the west of the capital.
"The security forces in the Baghdad Operations Command, with the assistance of military aircraft, managed to foil an armed attack launched by unknown gunmen against the ... two prisons of Taji and Abu Ghraib," the interior ministry said in a statement late on Sunday night.
"The security forces forced the attackers to flee, and these forces are still pursuing the terrorist forces and exerting full control over the two regions," it said.
But commenters on microblogging site Twitter, including some accounts apparently operated by jihadists, claimed that thousands of prisoners had escaped.
A number of users also posted similar claims on the Honein jihadist forum.
And people in Fallujah, a city west of Baghdad, said that relatives had escaped from prison and were attempting to get to a safe place, according to an AFP journalist.
The attacks on the prisons came a year after Al-Qaeda's Iraqi front group announced that it would target the Iraqi justice system.
"The first priority in this is releasing Muslim prisoners everywhere, and chasing and eliminating judges and investigators and their guards," said an audio message attributed to the group's leader, Abu Bakr al-Baghdadi last July.
Prisons in Iraq are periodically hit by escape attempts, uprisings and other unrest.