The slaying of Salwa Bugaighis stunned residents of her home city, politicians, activists and diplomats, among whom she was well known.
Bugaighis, a lawyer and rights activist, was at the forefront in the 2011 uprising against dictator Moammar Gadhafi. After his ouster, she became one of the most outspoken voices against militiamen and Islamic extremists who have run rampant in the country.
The identity of the gunmen was not immediately known. Islamic radical militias, however, have been blamed for frequent assassinations of secular activists, judges, moderate clerics, policemen, soldiers in Benghazi, Libya's second largest city.
She was rushed to a hospital where she died of her wounds, he said.
More From This Section
Her husband, who is a member of the Benghazi municipal council and was also at home at the time, has disappeared since the attack and is believed to have abducted, al-Sharaa said.
Earlier in the day, Bugaighis had been speaking by phone from her home on a Libyan TV channel about fighting raging near her neighborhood, sparked when militants attacked army troops deploying to protect polling stations.
"These are people who want to foil elections. Benghazi has been always defiant, and always will be despite the pain and fear. It will succeed," she told Al-Nabaa network as rattling gunfire interrupted her call.
In the evening, five gunmen broke into her home, the house's guard told police, al-Sharaa said. They first asked about her son Wael, then shot the guard in the leg, then broke into the house. The guard said he heard gunfire from inside.
The European Union and United Nations missions in Libya also expressed their shock and condemnation.