Hassan bin Sophia, who is spokesman of the Zliten local council, said only four guards were watching 220 criminal and political detainees at the prison yesterday.
He said the prisoners asked for a doctor, and when the prison gate was opened, they attacked the guards and fled.
He said 19 prisoners were soon recaptured, two of them wounded when guards opened fire. Local officials are contacting the families of the escapees to convince them to surrender.
Libya has experienced a security vacuum since the 2011 overthrow of Moammar Gadhafi. Earlier this month, 54 detainees escaped from a prison in the capital Tripoli.