Hooded attackers shot dead Tripoli police chief Colonel Mohamed al-Suissi in the Libyan capital's eastern suburbs on Tuesday, a security source told AFP.
"Colonel al-Suissi was assassinated by a group of unknown hooded people who opened fire on him in his vehicle. Two men with him were kidnapped in the attack," said the source, who asked not to be named.
Suissi had taken part in a meeting of Tajura municipal council in the eastern suburbs and was on his way back to Tripoli city centre when the attack took place, the source said.
State news agency Lana confirmed the assassination and said Colonel Suissi died shortly after arrival at a nearby clinic.
The agency added that the two bodyguards who had been abducted when Suissi was killed had been freed and were heading back to their Tripoli headquarters. It gave no further details.
There was no immediate claim of responsibility.
Interior ministry spokesman Rami Kaal said an investigation was underway into Suissi's death, adding that funeral arrangements were being planned for the police chief.
Signup to our newsletter and follow us on Facebook and Twitter!
Since the fall of long-time dictator Moamer Kadhafi in 2011, the interim authorities have failed to establish order and security in a country prone to anarchy and deadly violence.
They have been unable to restrain a large number of militias formed by ex-rebels who fought Kadhafi and who still hold sway across Libya.
However, though the army and law enforcement services are regularly targeted in the eastern city of Benghazi, such attacks are rare in Tripoli.
The killing of the police chief comes at a time of clashes between rival militias in the Libyan capital, centred on the international airport which has been closed by the violence since July 13.
Witnesses said the sound of explosions can be heard daily from the fighting.
The clashes have killed at least 124 people and wounded more than 500. Officials say the strife has displaced around 36,000 people who have fled the area for safer parts of Tripoli.
The violence has triggering a dire humanitarian situation in the Libyan capital, where petrol and bottled gas have become scarce along with food supplies and water.
Many shops and banks have also stayed closed.