Libyan militias
Troops and vehicles from the national army in Kufra, are seen taking part in a "Operation Dignity" mission, at the Libyan-Egyptian border, near Kufra, June 4, 2014. Reuters/Stringer

Over the past two months, militias in Libya have been vying for power in the major cities. Existing rival militias have become even more fractionalized and loyalties have both been strengthened and frayed.

The situation on the ground is changed completely from even six months ago and is confusing not only for the militias themselves, but for everyone trying to understand exactly what is going on in Libya.

An infographic based on our research, as well as think-tank data, explains how the loyalties among the militias in Libya are currently split geographically. We explain below the militias’ history and current status, as well as the affiliation to Abdoulgassim Khalifa Hifter, a former general in deposed dictator Moammar Gadhafi's armed forces who has been launching attacks against the current Libyan government and has played a promiment part in propelling the country into a new state of chaos.

*This map does not include militias from southern Libya

1. Libyan National Army: The so-called Libyan National Army came into the picture in February 2014, but started its offensive in May. Renegade General Hifter controls this group, which claims 6,000 soldiers. It operates in the east of the country, mostly in Benghazi. Hifter recruited and trained thousands of young Libyans from this area to fight government forces.

Military forces in eastern Libya, including some who still have connections to the Libyan army, pledged loyalty to Hifter in May.

Hifter, along with 300 other men, was captured at the Battle of Maatan al-Sarra on Sept. 5, 1987, by Chadian military forces, during the war Gadhafi waged in his southern neighbor. Following the capture, the dictator refused to admit that there were Libyans being held captive in Chad. Many of those captives formed an anti-Gadhafi insurgent group while in captivity, and named Hifter as their leader. It was during his captivity in Chad that Hifter's loyalty changed and he began a long fight to oust Gadhafi and take power.

2. Libya Shield: The Libyan Shield is a group of militias based in Benghazi. It reports to the Defense Ministry and is affiliated with the government. The group was attacked by Hifter during his offensive in May. It has four brigades across the country.

3. Al-Zintan Revolutionaries’ Military Council: The Al-Zintan Revolutionaries’ Military Council formed in 2011. The group brings together 23 militias in Zintan and the Nafusa Mountains in western Libya. It played a role in the recent clashes at the Tripoli airport. The Zintan militias are some of the strongest in the country. The group controls Tripoli’s airport after taking it over during the fall of the capital in 2011. Rival militias tried to take over the airport this week, but failed.

4. Al-Qaqa Brigade: This group was formed by Libyans in the western part of the country who trained in the Zintan area during the revolution. It used to align with the National Congress and is known to have bases in Zintan and Tripoli. This group has officially announced its support of Hifter.

5. Al-Sawiq Brigade: The Al-Sawiq Brigade has strong connections to Al-Qaqa and has also pledged allegiance to Hifter. The two groups said in a statement back in February that they wanted the Libyan parliament to step down.

6. Misrata Brigades: This is an umbrella group that formed in 2011. It was seen as a revolutionary militia and is Zintan’s main rival militia. It seized weapons from Gadhafi's forces during the revolution. It was accused of war crimes by the U.N.’s International Commission of Inquiry on Libya.

7. 17 February Martyrs Brigade: Based in Benghazi, this Islamist militia is thought to have about 12 battalions. It fought against Gadhafi during the 2011 revolution and has a membership in the low thousands. It was linked to the events in the 2012 Benghazi attack that killed U.S. Ambassador Chris Stevens.

8. Ansar al-Sharia Brigade: Linked to al Qaeda and currently in control of Camp 27, also known as Camp Younis, which was used by the U.S. for a counterterrorism training mission. The group is Islamist in nature and supports Shariah law. It also is thought to have played a part in the 2012 Benghazi attack. The group operates in Benghazi and Darnah.