TRIPOLI The brief seizure of Libyan Prime Minister Ali Zeidan by a former rebel group has highlighted the fragile government's struggle to contain ex-fighters and tribal militias who operate with impunity in parts of the country, two years after the Western-backed overthrow of Muammar Gaddafi.
Here are details of the main militias and armed groups operating in Libya and their locations:
LIBYA SHIELDS - Mostly a coalition of militias from coastal cities west and east of Tripoli, mainly Zawya in the west and Misrata in the east. They were brought into Tripoli in August by the General National Congress, Libya's transitional assembly, to bolster security after heightened tensions and widespread fears that pro-Gaddafi factions were joining forces with anti-Islamist tribes to unseat the government. The Shields were set up as a reserve army last year and allocated a budget. While opponents see them as Islamist in leaning, supporters say they are the nucleus of a new army. Their leaders oppose the growing dominance of Arab Bedouin tribes led by the Zintans in the security forces. The group that held Zeidan, the Operations Room of Libya's Revolutionaries, is affiliated to the Shields.
SUPREME SECURITY COMMITTEE - This is influential in eastern Tripoli and acts as a defacto police force. It is in alliance with the Shields against tribal Zintan militias.
THE ZINTANS - The most powerful, Bedouin tribal militia is drawn from the desert garrison town of Zintan, 140 km (90 miles) southwest of the capital. Since seizing Gaddafi's palaces, they have entrenched themselves in an affluent part of western Tripoli. Their unruly elements have been accused of some of the worst excesses of banditry and kidnapping. Their commanders lead the Qaqaa militia, an 18,000 strong force that has incorporated many members of Gaddafi's Russian-trained special forces. The Qaqaa oppose what they see as the growing influence of Misrata and the Shields in the post-war order. They have accused Islamists and their allies of dominating parliament and government. This year Zintans also took over the El Feel and Sharara oilfields in the west to demand more compensation, before a deal was struck.
JIHADIST-SALAFIST GROUPS - These are mostly former fighters from the Libyan Islamic Fighting Group which played a leading role in toppling Gaddafi and who have some members in the national assembly. They led an insurgency in the 1990s and many fought in Iraq and Afghanistan with al Qaeda. They have strongholds in the eastern coastal city of Derna and in Benghazi. Their aim is to establish a Islamic state in Libya. The hardline Islamist faction Ansar al-Sharia was blamed for the 2012 attack on the U.S. consulate in the eastern city of Benghazi. It was forced out of its bases by protests afterwards but returned. After France sent troops into Mali early this year, more al-Qaeda linked fighters crossed into lawless southern Libya. Algerian officials say an attack on the In Amenas gas plant in January, in which nearly 40 foreign workers died, was launched from Libya.
CYRENAICA FEDERALISTS - Federalists are calling for more autonomy for their eastern region of Cyrenaica with Benghazi at its heart. Benghazi was the cradle of the uprising against Gaddafi with long-held grudges against Tripoli and they have since demanded more of a share of post-revolution spoils. One eastern leader, Ibrahim al-Jathran, the former head of an oil protection security unit, defected and seized eastern ports as a self-styled federalists. He has several thousand men who have managed to cut Libya's oil exports in half for months.
(Reporting by Suleiman al-Khalidi in Amman and Ghaith Shennib in Tripoli, editing by Patrick Markey and David Stamp)