A top Libyan security official has said that gunmen attacked a prison in the capital Tripoli, breaking free eight prisoners in fighting that left another prisoner dead.
Omar al-Khadrawi, Libya's deputy interior minister, said the detainees had been awaiting trial for crimes committed in the past year.
He said unknown assailants in a Land Cruiser opened fire on security personnel guarding the facility late on Friday in what appeared to be a coordinated attempt to free some of the men inside.
Three policemen and two prisoners were wounded.
It was the third rebellion at Tripoli's al-Fornaj prison, where detainees complain they have been held for months without word of trial.
Since last year's revolution that ousted longtime leader Muammar Gaddafi, Libya has struggled to restore security and rebuild its judicial system.
The prison break follows an incident in the eastern city of Benghazi, in which unknown gunmen have reportedly shot dead a Libyan army general. It was the latest of a string of deadly attacks on security officials.
Mohammed Hadia, who was also a high-ranking defence ministry official, was leaving a mosque after Friday prayers when he was ambushed.
"My father was returning from the mosque after Friday prayers with a neighbour when a car stopped in front of them with four people on board," Ahmad Hadia, one of the victim's sons said.
"They asked for his identity, then shot him dead," he added.
The motive for the murder was not immediately clear.
Hadia was one of the first officers to defect and join the opposition during last year's revolution that ousted Gaddafi. After the revolution he was appointed head of armaments at the defence ministry.
Hadia is the latest of dozens of security officials murdered in Benghazi, especially of officers who had served under Gaddafi.
A strong explosion rocked the Libyan military intelligence in Benghazi last week but caused no casualties.
Last Sunday, Suleiman Bouzrida, a former military intelligence colonel, was shot in the head twice while walking to a mosque for early morning prayers. He also had joined the rebels in the early stages of the revolution.