Over 1,000 inmates escape during prison riot in Libyan city of Benghazi

More than 1,000 inmates have escaped during a prison riot in Benghazi as protesters attacked Muslim Brotherhood offices following a wave of assassinations.

"There was a riot inside Al-Kuifiya prison, as well as an attack from outside," an official, who asked not to be named, said.

"More than 1,000 prisoners escaped. Special forces called in as reinforcements were given orders not to fire at the prisoners."

He said most of the escapees were common law detainees, including nationals of other African states.

"But some of them were detainees in cases linked to the former regime of Moamar Gaddafi," he said, adding that several inmates were recaptured shortly after the breakout.

Libya's prime minister, Ali Zeidan, confirmed the incident, without giving the number of fugitives.

"Residents of the area carried out the attack because they don't want the prison near their homes," he said, adding that border posts had been alerted and given a list of names to apprehend the escapees.

Mr Zeidan earlier announced that border posts with Egypt had been closed to prevent the escape of the killers of a prominent activist in the eastern Libyan city on Friday.

In Benghazi, youths stormed and ransacked the building housing the Brotherhood's political wing, the Party of Justice and Construction (PJC), after hundreds took to the streets to condemn the assassination of Abdessalem al-Mesmari, an anti-Islamist lawyer who campaigned for a civil state.

The demonstrators accuse the Brotherhood of being behind killings that have targeted dozens of officers, especially in Benghazi, the city that was the cradle of the 2011 armed uprising that ousted Gaddafi.

In Tripoli, hundreds of people gathered at Martyrs Square in the heart of the capital to demonstrate in "solidarity with Benghazi" and against the Islamist movement.

Chanting "the blood of martyrs was not shed in vain", the protesters converged on the square as they left mosques after morning prayers.

About 100 youths then descended on PJC offices in the Ben Ashur district, smashing its windows and looting furniture.