The official said that Hassan Draouai, also a former representative in the war-time transitional council, was shot to death near a central market by gunmen on Saturday night.
The official spoke Sunday on condition of anonymity because he was not authorized to brief reporters.
Since the fall of dictator Moammar Gadhafi in Libya’s 2011 civil war, gunmen have killed low-level government employees, activists, clerics and security officials. Draouai’s slaying marks the first time a top government official has been targeted in the wave of killings.
Libya’s current government has failed to rein in hundreds of militias born out of former rebel brigades — including those led by extremist Islamic commanders.