Three army and police officers died in separate attacks in Benghazi Sunday, the latest in a string of attacks against security forces in Libya's second city, a security official said.

"Air force Lieutenant Colonel Ali al-Daghani was killed when a device placed in his car exploded near a market," said Abdullah al-Zayedi, a spokesman for the security forces.

"A few metres (yards) away, police officer Nejib Bel Hacen al-Zwei died when a homemade bomb exploded in his car," he said, while another officer, Abdelkader al-Maadani, was gunned down outside his Benghazi home.

Benghazi, cradle of the 2011 revolt which toppled Moamer Kadhafi, has been hit by a wave of deadly attacks targeting security personnel and judiciary members, many of whom served with the ousted regime.

Attacks in the eastern city have also targeted diplomats and Western interests.