Oil-rich Libya has called an election for June to replace its disputed interim parliament and try to resolve a power struggle, but violence among militias threatens to scupper the vote.
Highlighting the seriousness of the security threat, the navy's chief of staff, Rear Admiral Hassan Abu Shnak, his driver and two guards were wounded Wednesday when gunmen attacked his convoy in Tripoli.
Militias are blamed for growing unrest in the North African country since the 2011 NATO-backed uprising that killed dictator Moamer Kadhafi.
Successive governments have complained that the claim by the General National Council (GNC) to executive power as well as legislative authority has tied their hands in taming the militias.
The electoral commission said the election for the currently Islamist-dominated GNC will be on June 25.
While some observers doubt it will take place, one Western diplomat told AFP the vote could indeed go ahead.
"The electoral commission has the logistical and human resources needed to organise the elections on schedule," the diplomat said.
The government hopes such a vote could help avoid civil war after renegade general Khalifa Haftar, whom authorities branded an "outlaw," launched an Friday assault on Islamists in Benghazi.
Gunmen from the ex-rebel Zintan brigade, saying they back Haftar, stormed parliament on Sunday and set fire to an annex.
Haftar has won widening support for his campaign to rid Libya of jihadists.
His supporters include an elite special forces unit of the regular army in Benghazi, who have suffered mounting losses in suspected jihadist attacks in the eastern city where Islamists are well entrenched.
Police brigades, officers at Tobruk air base and the powerful Al-Baraassa tribe from the east have also declared support for Haftar.
And the chief of staff of Libya's air defence units, Colonel Jomaa al-Abani, told a private television channel overnight he was joining Haftar's offensive, dubbed "Operation Dignity."
It was not immediately known what political leanings, if any, Abu Shnak has or what might have prompted the attack.
He was on his way to work when his convoy came under fire, spokesman Colonel Ayub Kassem told AFP.
"He was lightly wounded in the head. A driver and two guards were also wounded, but their injuries are not life threatening."
Detractors have accused Haftar of being in the pay of the United States, where he lived in exile for two decades, but Washington has distanced itself from the renegade general.
"We have not had contact with him recently. We do not condone or support the actions on the ground, and nor have we assisted with these actions," State Department spokeswoman Jen Psaki said.
She declined to say whether Washington viewed Haftar's actions as a coup attempt.
Islamist militias, including the Benghazi-based Ansar al-Sharia, which was the focus of Friday's assault, have vowed to resist any move against them.
Ansar al-Sharia charged that Haftar was leading "a war against... Islam orchestrated by the United States and its Arab allies."
His forces withdrew from Benghazi after Friday's clashes, which killed at least 79 people, but Haftar said he would re-enter the city to cleanse it of "terrorists".
Ansar al-Sharia said "a confrontation is now inevitable to defend our city and our land. We will act with force against anyone who enters the city or attacks it."
The group, which denies accusations it was behind a September 2012 attack on the US consulate in Benghazi that killed Ambassador Chris Stevens and three other Americans, was put on the US terror blacklist in January.
As military tensions escalated, a political showdown was being played out at the 194-seat GNC.
The Muslim Brotherhood, largest bloc in the congress, and radical Islamists had rejected government calls for the GNC to go into recess.
Former rebels once hailed as the heroes of the 2011 revolt are heavily armed and have regional, tribal and ideological rather than national interests.
Both sides in the stand-off have militia allies positioned around Tripoli, raising fears of a rapid degeneration into armed conflict.