|Four fighters were killed in a gun battle between rival armed groups in Tripoli earlier this week [Reuters]
Libya named Yousef al-Manqoush, a retired general from Misrata, as head of the armed forces in the first significant move to build a new Libyan military.
The appointment was announced on Tuesday as four fighters were killed in a gun battle between rival armed groups in Tripoli, underlining the interim government's difficulties in controlling the increasingly fractious groups who toppled Muammar Gaddafi.
More than two months after he was captured and killed, real power remains in the hands of the armed groups, who have carved up Libya and its capital into competing fiefdoms, each holding out for the share of power they say they are owed.
To help reinstate law and order, the interim government plans to integrate thousands of former fighters in the military, the police and other civilian jobs.
Some armed chiefs say they will only cede command of their fighters once an organised military and security apparatus is in place.
Manqoush's appointment by Mustafa Abdel Jalil, the National Transitional Council chairman, could pave the way towards forming a structured military. But it is not clear yet whether the commanders of these armed groups will accept him.
His prospects could be boosted by the fact that he hails from Misrata, besieged for months by Gaddafi's forces and home to a number of the armed groups that helped to topple him and now seek what they see as a fair share of power.
Live Box 201142012730683527
Fighters from Misrata in particular hold a vast arsenal of tanks, rockets and guns.
The new interim defence minister, Osama al-Juwali, comes from Zintan, base of a another major armed group.
Manqoush is a retired army general who joined the campaign against Gaddafi and now serves as the deputy defence minister, according to an NTC official who asked not to be named.
"He's a military officer who chose to retire. He joined the front lines early in the revolution, was arrested by Gaddafi forces and then was freed by the revolutionaries."
Armed groups were given a December 20 deadline to leave Tripoli and have dismantled most of their checkpoints and limited their presence on Tripoli's streets, but crucially kept some bases.
Tuesday's battle on Tripoli's Zawiya road was the first involving armed groups since December 11, when soldiers from the new national army failed to wrest control of Tripoli's international airport from an armed force from Zintan.
Hunt for fighters
Former fighters from Tripoli controlling a security compound in the city fought off dozens of fighters from Misrata who were trying to seize a group of prisoners in a gun battle that lasted more than an hour, medics and former fighters said.
"Some of them screamed 'We're from Misrata, you dogs!' while they were firing," said another Tripoli fighter. "They wanted to take them [the prisoners] by force, they used 106mm [rocket] launchers and 14mm machine guns."
Afterwards, armed men combed central Tripoli looking for the Misrata fighters.
A pickup vehicle daubed with the words "The Defence Brigade, Misrata Revolutionaries" lay across the highway, riddled with bullets and with blood stains on the back seat. One fighter said 11 armed men from Misrata had been captured.
Vehicles carrying dozens of fighters and heavy-calibre machine guns blocked roads leading to the compound and snipers were stationed on rooftops.
Abdel Hakim Belhadj, an Islamist whose Tripoli Military Council says it has a mandate from Libya's new rulers to secure the capital, said the "situation was under control".
"The people who caused the problem were arrested and will face justice," he said.
A few hundred metres down the road, at Tripoli's central hospital, dozens of fighters filled the corridor leading to the