Since 2015, the UN-backed effort to rebuild Libya has focused on the Government of National Accord led by Prime Minister Fayez Al Sarraj.
A power map of the country's besieged capital Tripoli reads more like a brochure for expatriate shopping and housing developments, than a grid of government ministries.
From the Friday Market to the Corinthia Hotel, to Airport Road, to Palm City and The Heights, Mr Al Sarraj's government must turn to militia headquarters dotted around the Libyan capital for its firepower.
After advances to the outskirts of the city by the Libyan National Army under the control of Field Marshal Khalifa Haftar, the GNA relies on Tripoli's factions and fighters for its rearguard defence.
Most of the groups formed in the late days of Muammar Qaddafi's regime and have retained a geographical foothold since.
Many are also tied to towns and cities along the western half of the country, in particular the trading port of Misrata.
The arsenals of the former government were dotted around Tripoli and were looted by militia leaders as Qaddafi lost his grip.
US Central Command says the factions have continued to benefit from arms supplied by foreign backers, including Russia, Turkey and Qatar.
In recognition of the importance of the fighters, Mr Al Sarraj appointed the Misratan commander Fatih Bashagha as Interior Minister late last year and put him in charge of training hundreds of recruits for a new police force.
The appointment came a few weeks after the counter-terror force of Misrata's Bunyan Al Marsous was sent to Tripoli amid outbreaks of fighting between other factions.
But not all parts of the Misrata group are behind Mr Al Sarraj, with doubts over the sympathies of its feared 604 Battalion faction.
The Tripolitanian militias enjoy close dependent links with Mr Al Sarraj through an umbrella group, often called the Central Security apparatus.
In recent weeks, meanwhile, an operations room run by the Tripoli Protection Force has sought to co-ordinate militias in areas outside the LNA's control between the capital and Sirte.
Abdelrauf Al Kara, commander of the Special Deterrence Forces, or Rada, is a dominant player in one part of the city, controlling Mitiga, the main airport and neighbouring airbase.
Mr Al Kara's forces run a feared prison in Tripoli that operates a strict regime. Among the inmates is Hashem Abedi, brother of the Manchester suicide bomber.
Rada operates in close alliance with ideologically close Nawasi militia, a force emanating from the criminal gangs based in Souq Al Jumaa (Friday Market) area of Tripoli.
Other factions that cannot be ignored in Tripoli come under the sway of Haitham Al Tajouri, head of the Tripoli Revolutionary Brigades.
Among the strongholds of the group in Tripoli is the Intelligence Directorate and its Ostrich Farms base.
Even under Qaddafi, the Abu Saleem area of the capital was a no-go zone much of the time for the dictatorship.
A prison in the area held much of the country's Al Qaeda leadership for more than a decade. It has remained politically powerful and a base of people-trafficking and smuggling.
Under the leadership of Abdelghani Al Kikli, universally known Ghenewa, it has much of central Tripoli under its control.
Other groups feed into the shifting alliances between the main Tripoli Protection Force factions.
Some, such as the fighters of the Roman-era Old City, who are based in the Corinthia Hotel, are known purely for the geographical strongholds.
Others have profited greatly from the breakdown of authority after Qaddafi, such as the Anas Dabashi group that held a lock on people smuggling from the town of Sabratha and the international gas terminal at Mellitah.
Even the UN operation in Libya relies on the goodwill of fighting factions for the ability to pass through the area.
In particular, the Janzour Knights provide protection for the Sidi Abdeljaleel district, which includes the UN base at Palm City.
The area was where the US Africa Command removed its training forces and other parties from Tripoli by hovercraft this month.
The stance of other key players in the region has remained more ambivalent, including most notably the militias from the Zintan region, who were at the forefront of ousting Qaddafi from power.
Under the command of former defence minister Osama Al Juwali, the Zintan Military Council has only occasionally responded to calls for support from Mr Al Sarraj and his UN-backers.