It is nearly nine years since the death of Muammar al-Gaddafi, splintering Libya into a protracted conflict of contested rulers and warring militias.

For more than a year now, Libya’s U.N.-backed Government of National Accord (GNA) in the capital of Tripoli has been under attack by forces loyal to the rogue General Khalifa Haftar, who heads his own Libyan National Army (LNA) which controls swaths in the east of the country, including the city of Benghazi.

While the GNA is supported by the United Nations, Turkey and –­ at least initially –­ the United States, the LNA gets its military might from Russia, Egypt, United Arab Emirates and, more quietly, France.

On June 3, GNA-linked troops squeezed the LNA out of Tripoli’s International Airport and proceeded to take back nearby cities, including Tarhouna and oilfields in Sharara, after months of Haftar-led occupation. The fighting has since progressed to Sirte, Gaddafi’s hometown and onetime home base for ISIS in the region.

WHAT IT IS LIKE TO BE A CHRISTIAN ACTIVIST JAILED WITH ISIS OPERATIVES IN SUDAN

The GNA’s unexpected maneuver to take back full control of Tripoli – forcing the LNA to retreat and spurring more defections – has put the spotlight on Turkey’s growing involvement in Libya.

Throughout the course of the year, Turkey is reported to have sent a number of drones into Libya, along with thousands of Syrian fighters, to go head-to-head with scores of Russian mercenaries on the ground.

“Washington is increasingly concerned about the Kremlin’s growing military and political footprint in Libya, first through private military contractors and then through deploying fighter jets,” Aykan Erdemir, a senior director at the Foundation for the Defense of Democracies (FDD) told Fox News. “Libya, which is a short distance from key NATO allies in southern Europe, is fast becoming the theater of the great power competition between Russia and the United States.”

In this Jan. 17, 2020, file, photo, Libyan Gen. Khalifa Hafter joins a meeting with the Greek Foreign Minister Nikos Dendias in Athens. The U.S. military Tuesday, May 26, 2020 accused Russia of deploying fighter planes to conflict-stricken Libya to support Russian mercenaries aiding east-based forces in their offensive on the capital, Tripoli.

The swift GNA victories this month have also cast doubt on the future of Haftar, who has tried to project an image of himself at the helm of a more orderly and efficient military outfit, despite routinely dismissing allegations of committing war crimes.

According to Seth Frantzman, a Libya expert and author of “After ISIS: America, Iran and the Struggle for the Middle East,” Haftar’s forces were doomed due to a lack of training and support from their Gulf and Egyptian supporters.

“No one was ever serious at stabilizing Libya using Haftar or an agreement with Tripoli to do so,” he said. “Haftar’s fighters were not well trained on the Russian air defense systems they operate unless he received better equipment and regional power support, the way Turkey has sent to oppose him, his forces will lose ground or end up in a stalemate.”

Subsequently, the retreat of Haftar’s LNA – and the cataclysm of their 14-month mission to fully take over the Libyan capital – has also led to the discovery of eight mass graves in the pockets that they once controlled southeast of the city.

In addition, GNA officials have announced the discovery of dozens of bodies heaped in shipping trucks and the town morgue. It remains unclear when the killings happened, but the U.N. is calling for an investigation.

The Libya calamity also brings with it a schism within NATO, with Turkey and France on opposing sides. According to the AFP, French officials this week took aim at Turkey’s “aggressive intervention in Libya,” accusing the NATO member of violating an arms embargo and characterizing its military incursion as “unacceptable.”

A picture taken in Tripoli on June 29, 2019, shows fighters loyal to the internationally-recognized Libyan Government of National Accord (GNA) displaying precision-guided munition, which were reportedly confiscated from forces loyal to General Khalifa Haftar in Gharyan. (AFP/Getty)

Moscow and Ankara, who similarly worked together to broker a ceasefire in Syria despite backing opposing sides in the civil war, were due to hold ministerial-level discussions this week regarding Libya. However, the talks were abruptly “postponed” without further explanation on Monday.

It also remains unclear if the U.S. – which has shied away from the oil-rich nation since the attack on a U.S. diplomatic facility in Benghazi claimed the life of Ambassador Christopher Stevens and three other Americans in 2012 – will take a more active role as tensions rise. However, Libya has seemingly earned a higher placement on the Washington priority list in recent weeks, with U.S. Africa Command issuing warnings over Russia’s weapons transfers.

“After the fall of Muammar Gadaffi in 2011, Libya sank deeper into internal conflict. Extremist groups, proxy fighters backed by Qatar and other Gulf powers, ISIS and militias fought over Libya, turning it into a living hell for locals and for refugees, such as Africans, fleeing through Libya to Europe," Frantzman said.

"Libya has been badly harmed and economically hollowed out by nine years of war and abandonment by the international community,” he continued. “The U.S. is concerned about Russia’s decision to send warplanes to Libya. Turkey’s pressure on the U.S. to take Ankara’s side and Egypt’s request for a ceasefire puts the U.S. in a unique position of potentially brokering a deal with the Russians to reduce tensions in Libya.”

However, Frantzman surmised that “this only works if the U.S. doesn’t take Ankara’s bait and decides to back Turkey’s misguided escalation.”

From the lens of Turkish President Recep Tayyip Erdogan, who had a June 8 call with President Trump, Libya has ignited a “new era” in relations with Washington after years of strain stemming from issues including political prisoners and the U.S. support of Kurdish forces in Syria, which Turkey views as terrorists.

US MILITARY DRONE DISAPPEARS OVER LIBYAN CAPITAL, OFFICIALS SAY

Nonetheless, some analysts say that there is a multitude of agendas at play.

“Turkey wants energy rights to the Mediterranean to cut off a pipeline deal signed between Greece and Israel, forcing countries in the Mediterranean to go to Turkey for their needs. It wants bases in Libya to project power and continue to hold the European Union hostage with refugees as it already does using Syrians as a periodic refugee threat in Ankara’s rhetoric,” Frantzman continued.

“Overall, Ankara wants to expand the influence of the Muslim Brotherhood-affiliated parties, to pressure Tunisia and Egypt, potentially undermining Tunisia’s democracy and secularism. Ankara is deeply hostile to Egypt’s leadership, and Turkey’s ruling party is rooted in the Muslim Brotherhood.”

Libyan Red Crescent workers pick up a body of a drowned migrant near the city of Khoms, some 100 kilometers (60 miles) east of Tripoli, Libya, Friday, July 26, 2019. Libya's coast guard recovered dozens of bodies of Europe-bound migrants who perished at sea as search operations continued Friday, a day after up to 150 people, including women and children, went missing and were feared drowned after their boats capsized in the Mediterranean Sea. (AP Photo/Hazem Ahmed)

Erdemir also pointed out that Turkey has “multiple goals” in Libya.

“As the Muslim Brotherhood’s leading patron worldwide, [President Erdogan] sees Libya as one of the last domains where his Islamist project still has a chance to control a polity besides Turkey and reverse its long chain of losses over the last decade,” he explained. “Furthermore, Ankara’s maritime deal with the Tripoli-based GNA is instrumental to Turkey’s maximalist maritime challenges to Greek, Cypriot, and Egyptian exclusive economic zone claims in the eastern Mediterranean. Libya’s hydrocarbon sources and lucrative government contracts also attract Erdogan, who is struggling with one of the worst economic crises in Turkish history.”

CLICK HERE TO GET THE FOX NEWS APP

Compounding the LNA versus GNA war theater is the notion that Libya is also beleaguered by scores of terrorist militia groups, including an ISIS presence, all competing for land, resources, fighters and control.

“ISIS has cells in Libya and could burst back onto the scene if chaos or instability grows, so the increased role of Ankara could feed extremism in Libya,” Frantzman added. “There are a plethora of jihadist and Al-Qaeda and other groups in the Sahel south of Libya, all of which would like to eat away at Libya if given a chance.”