A protester reacts as the U.S. Consulate in Benghazi is seen in flames during a protest by an armed group said to have been protesting a film being produced in the United States September 11, 2012. Esam Omran Al-Fetori/Reuters A mass jailbreak has occurred near Benghazi, Libya, with more than 1,000 detainees held for "serious charges" escaping, AP reports.

"There was a riot inside Al-Kuifiya prison, as well as an attack from outside," one security official said to AFP, speaking on condition of anonymity. "More then 1,000 prisoners escaped. Special forces called in as reinforcements were given orders not to fire at the prisoners."

From AP:

It wasn't immediately clear if the jailbreak was part of the protests or if inmates received outside help.

A security official from the prison confirmed the jailbreak happened. He said most of the inmates were being held on serious charges. He spoke on condition of anonymity because he was not allowed to speak with journalists.

Benghazi's security situation is among the most precarious in post-revolution Libya. Last year, the U.S. ambassador and three other Americans were killed in an attack there.

The unnamed security official told AFP that most who escaped were being detained for common crimes, but some had links to the former Qaddafi regime. Several were recaptured soon after the breakout.

The prison break is reminiscent of what happened earlier this week in Iraq, with 500 convicts — including senior members of al Qaeda — being released after outsiders attacked their prison and freed them.