Security officials say a bomb has killed a state attorney and gunmen have shot dead two policemen in eastern Libya.

The country is been gripped by unrest, and assassinations of public figures and security officials are frequent. Many killings are blamed on militias, which the government is struggling to rein in.

A security official in the city of Darna, a stronghold of Islamic militants, said a bomb was placed in the car carrying public attorney Mohammed Khalifa al-Naas on Saturday. Another security official said unknown gunmen fired at a security patrol in a commercial area in Benghazi, Libya's second city, leaving two policemen dead.

The officials spoke anonymously because they were not authorized to speak to the media.