Parliament in Libya has named a new military chief of staff tasked with tackling armed militias that control vast areas of the violence-plagued North African nation.
"Colonel Abdel Razzak Nadhuri was chosen by 88 out of 124 MPs present and promoted to the rank of general" on Sunday, parliament spokesman Mohammed Toumi told AFP.
Nadhuri replaces General Abdessalam Jadallah al-Abidi, who was grilled by parliament on August 10 on the army's inability to restore law and order to Tripoli and Benghazi, the country's two largest cities where militiamen have run rampant.
Parliament, which sits in Tobruk, 1,600 kilometres (1,000 miles) east of the capital, held Abidi responsible for the deteriorating security situation and blamed him for backing certain militias that in theory report to the army.
"General Abidi was in fact sacked" after his appearance, Toumi said.
Libya's new chief of staff comes from Marj some 1,100 kilometres east of the capital.
During the 2011 uprising against long-time dictator Muammar Gaddafi, his battalion joined insurgents in second city Benghazi, the cradle of the revolt.
Overnight Saturday-Sunday, the Libyan parliament branded as "terrorists" Islamist militias and jihadists who challenge its legitimacy, and stated its intention to fight back through the regular armed forces.
"The groups acting under the names of Fajr Libya and Ansar al-Sharia are terrorist groups and outlaws that are rising up against the legitimate powers," parliament charged in a statement.
"These two groups are a legitimate target of the national army, which we strongly support in its war to force them to halt their killings and hand over their arms," MPs said.
Fajr Libya is a coalition of Islamist militias, mainly from Misrata, east of Tripoli, while Ansar al-Sharia, which Washington also brands a terrorist group, controls around 80 percent of the eastern city of Benghazi.
Islamist militias openly challenged the legitimacy of parliament on Sunday after announcing their seizure of Tripoli airport, plunging Libya's rocky political transition into fresh crisis.
Tripoli airport, 30 kilometres (20 miles) south of the capital, has been shut since July 13 because of deadly clashes between the Islamists and the Zintan force of former rebels that previously controlled it.