The first major war of the new scramble for Africa is being fought in Libya as the country appears headed towards some form of partition with Vladimir Putin and Recep Erdogan emerging as the kingmakers.

On the western side is a Turkish-led force that has been converging on Sirte, the strategic city at the midpoint of the country’s Mediterranean coastline, which is held by General Khalifa Haftar’s Libyan National Army (LNA).

Sirte, the hometown of Muammar Gaddafi, is the gateway to the coastal east, the oil crescent and the al-Jufra desert base.

Defending the city are Russian mercenaries from the Wagner group, supported by tribal militias and former Gaddafi loyalists, Russian fighter jets and Sudanese and Chadian mercenaries, underwritten by Mohammed bin Zayed Al Nahyan (MBZ), the Crown Prince of Abu Dhabi, who has been described as the most powerful Arab ruler.

President Abdel-Fatah al-Sisi of Egypt has threatened to send his army to defend the city, which would lead to an all-out confrontation between Turkey and Egypt. France and Saudi Arabia are also, to varying degrees of public commitment, part of this alliance.

Both armies consist largely of proxies and tribal militias. The forces of the Tripoli-based Government of National Accord (GNA) have been fortified by Turkish weapons, Syrian mercenaries and a mishmash of Islamist militias who sense an opportunity to inflict defeat on the Arab coalition. They are also backed by Qatar and quietly supported by the former colonial power, Italy.

The United States has remained aloof from the conflict since General Haftar attacked Tripoli in April last year. President Donald Trump sent out conflicting messages, at one stage calling up Mr Haftar when he appeared poised to take Tripoli, congratulating him for his successes.

More recently, Secretary of State Mike Pompeo’s team, appear to be siding with the Turkey/Tripoli alliance.

Richard Norland, the U.S. Ambassador to Libya, and Gen Stephen Townsend, the commander of Africom, last week met with the GNA and said they supported a truce, but appeared open to the GNA first recapturing Sirte.

The government in Tripoli is often described as “UN recognized”, which is true, but the country’s elected House of Representatives sits in Tobruk and its President Aguila Saleh has emerged as the most important leader in the East, eclipsing Haftar.

The lack of national unity has echoes in Libya’s past. Before the country was colonized by Italy in 1910 it consisted of three “vilayet” under Turkish Ottoman rule that roughly adheres to the current split between west (Tripolitania) and east (Cyrenaica), as well as the mostly desert lands of the south (Fezzan).

Tripolitania was part of the Maghrib (western Arabic) world and Cyrenaica was part of Mashrek (the eastern Arabic world). In many ways these deep cultural and historical distinctions have been re-emerging since 2011, triggered by the civil war.

The underlying politics of the country remains tribal, a reality that Gaddafi managed to navigate for decades without a central bureaucracy by wheeling and dealing with the tribal elders and sharing the oil booty with them.

But this unity was blown up by the uprising of 2011 and the western-led mission that ousted Gaddafi.

The country has battled to unify since then and the 2015 Skhirat agreement that laid the basis for the existing political structure of the country left many things undone, including failing to resolve the allocation of the oil revenue.

Mr Haftar, a former Gaddafi general who had worked for the CIA for decades, began his march across Libya from his base in Benghazi by first capturing the oil fields before turning towards the coast and marching on Tripoli in April 2019. But he got bogged down in the outer suburbs of the city.

Fayez al-Sarraj, the Prime Minister in Tripoli, whose government has historic ties to the Muslim Brotherhood, was on the ropes until a dramatic rescue operation launched at the end of last year by the Turkish President, Recep Erdogan. It was preceded by a maritime treaty between Tripoli and Ankara defining the boundaries of territorial waters in the Mediterranean.

On December 26, 2019, Mr Erdogan vowed to back Mr Fayez in Libya by sending him soldiers but chose not to send Turkish regulars. Instead, he sent North Syrian mercenaries from near Idlib, members of the Turkmen minority.

After Mr Haftar received reinforcements in the form of mercenaries from Sudan and Russia, Turkey started to deliver large amounts of military equipment of a much better technological quality; for example “hunter” drones that largely cleared the sky of the UAE drones used in support of Mr Haftar.

Turkey’s full-scale engagement in the conflict broke the siege of Tripoli in early June and ended Mr Haftar’s bid to control the whole of Libya. Turkey is now in the driving seat in Tripolitania and appears likely to remain the dominant power.

Russia is the only force with the strength, the will and the smarts to stop the Turkish march.

Along with the UAE, Egypt and other members of the alliance, they are concerned that a Turkish victory will lead to the establishment of a new ISIS or Al Qaeda beachhead in Libya.

In order to prevent this from happening, the GNA has to be stopped at Sirte. A victory there would open the way not only to Libya’s main oilfields but to Benghazi and Tobruk, which would be threatening to Egypt.

Vladimir Putin is determined not to allow this to happen. Russia has elevated the Libyan conflict from a sideshow to a major strategic consideration. Mr Putin appears not so much focused on a military victory but rather wants to stop Erdogan from fostering a radical Islamist state in Libya.

It would be a big victory for Mr Putin to deny the Islamists, secure Russian influence in the eastern part of Libya, entrench a diplomatic alliance with Egypt and emerge at the other end as the statesman who brought peace to Libya.

The Turkish-led forces have, as of the first week in July, been stopped outside Sirte by a force of largely Russian mercenaries.

Russia sent a vanguard of Wagner mercenaries and used their al-Jufra-based planes in combat, bombing and strafing the Turkish force – which had no air cover. The Turks had moved so quickly on Sirte that their logistics were hurried and they lacked artillery or proper armour.

Additionally, the local population in Sirte is Cyrenaïcan, hostile to the GNA and thus pro-LNA.

At the same time, the Russians sent forces to Sharara to keep the western oil fields out of Turkish hands.

An impending showdown between Egypt and Turkey that would rock the Middle East has been averted for now.

There is, however, a growing likelihood that Libya will be left with a de facto separation.

Since Mr Putin kept his lines of communication with Mr Erdogan open after the Idlib operations in Syria, he has a ready-made negotiating channel to discuss Libya with the Turkish government. Libya is already viewed as an extension of Russian-Turkish relations in Syria.

To achieve a political deal, Mr Putin seems ready to allow Turkey to revive its unfinished projects dating back to the Gaddafi era – about $20 billion in contracts – and to offer a compromise whereby Tripoli would get control of the western Sharara oil fields.

In exchange, he wants a de facto separation of Cyrena├»ca, even if gift-wrapped in some kind of “Libyan confederation” structure rather than turned into a de jure independence. Sharara would be the financial compensation for Tripolitania for the loss of the main oil crescent sites which would stay with the East.

This scheme is financially supported by the UAE which bankrolled the Russian counteroffensive on Sirte and Sharara. It also has the backing of Egypt.