Libya's premier said Thursday he will replace his defence minister a day after fighting in Tripoli between groups of ex-rebels highlighted a lack of security nearly two years after dictator Moamer Kadhafi fell.
Prime Minister Ali Zeidan said in a speech that the country's highest political authority, the General National Congress (GNC), had asked for Defence Minister Mohammed al-Barghathi's resignation.
"Members of the Congress asked the defence minister to resign or leave office," Zeidan said.
"The defence minister will be thanked and we are going to name a new minister," he said.
Barghathi had already announced his resignation on May 7 before withdrawing it again just hours later at Zeidan's request.
His resignation last month came after the GNC passed a law on May 5 banning officials who had served under Kadhafi from government jobs.
That law could also affect Barghathi, who was an air force commander under the Kadhafi regime.
Thursday's announcement came after clashes erupted between two ex-rebel groups in the Abu Slim area of Tripoli.
On Wednesday, an armed group from the western city of Zintan attacked the Tripoli headquarters of another group to free five of their comrades who had been seized and were being held there.
The Zintanis freed their colleagues and ransacked the building.
Five people were killed in the fighting and another 97 wounded, the health ministry said.
Signup to our newsletter and follow us on Facebook and Twitter!
The interim head of Libya's army, General Salem al-Konidi, said: "We tried to intervene, but our resources did not allow it".
"The government refuses to equip the army," Konidi told Al-Ahrar television channel.
In his speech on Thursday, Zeidan decried the "painful events" that took place in the capital on Wednesday, and called for "draconian and drastic measures to disarm the civil population".
Tensions remained high in the city, as residents feared the outbreak of more inter-militia clashes.
Much of Libya's recent unrest has centred on the eastern city of Benghazi, the country's second city and cradle of the 2011 uprising against Kadhafi.
Attacks there blamed on Islamists have targeted both the authorities and Western interests.
But now unrest seems to be also spreading to Tripoli, where brigades of former rebels remain entrenched despite government efforts to disarm them.
In addition to the violence that hit Tripoli, there were also lethal attacks elsewhere.
Overnight, three car bombs exploded in Sebha, 700 kilometres (430 miles) south of the capital. Two people died and 17 were wounded in the blasts, which came at roughly half-hour intervals, officials said.
And in Benghazi on Wednesday, an army officer was killed after a bomb placed in his official vehicle exploded.
Since the fall of Kadhafi's regime, militia groups, mostly ex-rebels, have managed many strategic facilities in the country.
Coming from different parts of the country, representing different tribes and with varying ideologies, they have received salaries and perks from the authorities, and some have even benefitted from smuggling and extortion.
The new authorities are battling to establish military and security institutions capable of restoring law and order and state authority in the face of the militiamen.