Analysts estimate there are up to 1,700 armed groups operating in Libya, where the central government has struggled to impose order since the 2011 ouster of Moammar Gadhafi.
The groups are divided ideologically. Some have battled each other. The government has formed security alliances with others.
Here is a look at some of the groups that have been most active in the country.
Misrata Brigades: More than 200 militias are part of the heavily-armed Misratan Union of Revolutionaries, based in the coastal city of Misrata. The group, which has about 40,000 members, is regarded as a revolutionary militia.
Ansar al-Sharia: An al-Qaida-linked Islamist group that gained prominence in 2012, the Salafist militia believes all authority comes from the Prophet Mohammed. The United States blamed the group for the deadly 2012 assault on the U.S. consulate in Benghazi.
Zintan: Al-Zintan Revolutionaries Military Council, based in the western Nafusa mountains near the town of Zintan, is an umbrella group of militias. The group, which controls the Tripoli airport, has been battling Islamic militias seeking control of the facility.
National Army: A nationalist armed group led by rogue Libyan general Khalifa Haftar. Haftar promotes himself as a nationalist who is trying to save Libya from Islamic extremists. In May, his forces overran parliament and vowed to fight against what they called an illegitimate government.
Libyan Revolutionary Operations Room (LROR): An alliance of pro-Congress militias that was used by the government to protect Tripoli. However, LROR was stripped of that responsibility after some of its members briefly kidnapped then-Prime Minister Ali Zeidan last year. A LROR branch has been dealing with security in Benghazi.
February 17 Martyrs Brigade: The armed Islamist group is one of the largest and best armed militia groups in the eastern Benghazi region. The Islamist group is funded by the defense ministry. It has carried out various security and law and order tasks in the region.