Clashes occurred in western Libya since 14 October 2016, when a coup d'état attempt was conducted by the former head of the National Salvation Government (GNS), Khalifa al-Ghawil, against Prime Minister Fayez al-Sarraj, the head of Libya's Government of National Accord (GNA). This evolved into fighting between the GNA and GNS for control of Tripoli and parts of western Libya, while pro-GNA militias also attacked other militias for control of the region.

Background

Following the First Libyan Civil War and the fall of the Libyan Arab Jamahiriya, the country had been in a state of discord and infighting. In 2014 the General National Congress was dissolved and new elections were called for the newly formed House of Representatives; following the election, Abdullah al-Thani was appointed as new Prime Minister.

Western Libya clashes (2016–2018)

In the meantime, Field Marshal Khalifa Haftar launched Operation Dignity, a massive military operation against Islamic militias. This caused an escalation of violence, resulting in the beginning of the Second Libyan Civil War. Because of the constant violence, the Government and the House of Representatives were forced to abandon Tripoli and relocate in Tobruk.

Western Libya clashes (2016–2018)

On 6 September 2014 a faction of former Islamists MPs took control of Tripoli and re- established the General National Congress. The New GNC appointed a National Salvation Government (NSG) and elected Khalifa al-Ghawil as Prime Minister. Since then, two rival government existed, one based in Tripoli and the other in Tobruk.

Western Libya clashes (2016–2018)

On 5 April 2016, the United Nations brokered an agreement to create a Government of National Accord (GNA), with Fayez al-Sarraj as Prime Minister: the proposal was rejected by both factions. In the following weeks GNA and allied militias took control of Tripoli and terminated NSG, also dissolving the New GNC and establishing the Presidential Council and the High Council of State (HCS).

Tobruk government and its militia in the East led by Marshal Khalifa Haftar opposed the GNA. His forces had taken over the four key oil ports of Essidra, Ra's Lanuf, Brega and Al-Zueitina, but were cooperating with the GNA to permit oil exports.

On 31 August 2016, a 94-member rival to the HCS was proclaimed in Benghazi and its members offered to join the official HCS. On 10 October, the HCS's headquarters was attacked by unknown gunmen.

Coup d'état attempts

Late on 14 October, al-Ghawil proclaimed the reinstatement of the former GNS, having taken over the offices of a key consultative body of the GNA at the Rixos Hotel, a complex of administrative buildings and a television station, with GNA forces pulling back in the late afternoon without violence. The GNS supporters said the GNA was "void" and that they had replaced it. Al-Ghawil also declared all members of the GNA "suspended from their duties." He also said: "The presidential council was given chances one after another to form the government, but it has failed...and has become an illegal executive authority." He called for a new administration to be formed by the former Tripoli and Tobruk governments. He further claimed that all institutions including banks, the judiciary, and local authorities were under their jurisdiction.

The following day, the GNS-supporting militiamen in pickup trucks with mounted machine guns remained in place, though Tripoli was calm after the events. Meanwhile, the GNA posted images on social media showing its Presidential Council and ministers holding a meeting in the main offices of parliament in a different part of Tripoli, though earlier reports suggested they may have been in neighboring Tunisia. The GNA then reacted by threatening to arrest "those politicians who... attempt to create parallel institutions and destabilise the capital," while also condemning "efforts to sabotage the political agreement" and denounced the seizure of the Council of State building by an "armed group."

On 16 October, forces loyal to al-Ghawil sent reinforcements to protect the parliament building. They also seized the Government Palace. On the same day, fighting near a refugee camp in the area of Fallah, near the road to the airport, led to the death of at least one woman. Six other people, including a child, were wounded. The Presidential Guard then also pledged allegiance to the GNS. It was reported by Jeune Afrique that the Presidential Guard dropped the GNA because of unpaid wages.

On 17 October, Ghwail claimed on television that the GNS had fully taken control of the capital. Clashes between Ghawil forces and policemen also occurred.