Libya's official news agency says unidentified attackers hurled an explosive device at a security patrol in the eastern city of Benghazi, killing two and injuring several others.

LANA quoted military spokesman Col. Ali al-Shekhli as saying that armed men in a car threw a bomb at a security patrol late Tuesday. He said that authorities were investigating.

Benghazi has witnessed a string of attacks on police stations and assassinations of security officials over the past months, as the central government struggles to maintain law and order less than two years after the fall of dictator Moammar Gadhafi's regime.

Libya's former head of parliament, Mohammed el-Megarif, who resigned Tuesday because of a law that bans Gadhafi-era officials from holding senior posts, warned that weapons and militias are endangering Libya's democratic transition.