A marksman shot dead a prominent Libyan political activist as he emerged from Friday prayers at a mosque in the restive eastern city of Benghazi, a security official said.

Abdessalem al-Mesmari, an anti-Islamist lawyer who has been campaigning for a civil state in Libya, "was shot dead as he left a mosque and killed by a single bullet to the heart," Colonel Mohammed al-Hijazi said.

He said a sharpshooter probably fired the deadly bullet.

It was not immediately clear who shot Mesmari or why.

But he was among the first Libyans who launched an uprising against now slain dictator Moamer Kadhafi in 2011 when he helped found the political wing of rebels who later overthrew the regime.

After the revolution he took a prominent stand against the Muslim Brotherhood, which he accused of striving to take power in Libya despite popular discontent.

"Politics is virgin ground in Libya and the Brotherhood are trying to rape it," Mesmari was quoted as saying in 2011.

Benghazi was the cradle of the uprising against Kadhafi.

In recent month Libya's second city has been hit by a wave of bombings and assassinations targeting judges, the military and police officers who worked under the ousted regime.

Attacks generally blamed on radical Islamists have also been carried out against Western interests, include a June 5 attempt to kill Jean Dufriche, France's honorary consul in Benghazi.

On September 11 last year, Islamist militants attacked the US consulate in Benghazi, killing ambassador Chris Stevens and three other Americans.