Since renegade military commander Khalifa Haftar launched an offensive on Libya's capital Tripoli in April, the conflict in the North African country has ground to a standstill.

After months of fighting, forces aligned with the United Nations-recognised Government of National Accord (GNA), based in Tripoli, have largely prevented Haftar, who is affiliated with a rival administration in the east, from seizing the city.

More:

Following a recent escalation in fighting, the UN on Wednesday welcomed calls by Turkey and Russia - who support opposing sides in the conflict - for a ceasefire amid warnings that Libya faced becoming a "second Syria".

As more foreign actors jostle for influence in Libya, Al Jazeera takes a look at the powers looking to shape events in the war-wracked country and who they are siding with.

United Arab Emirates

The United Arab Emirates (UAE) is seen by many experts as one of Haftar's main supporters, having supplied him with advanced weapon systems in violation of a 2011 UN arms embargo imposed at the beginning of an uprising that toppled longtime leader Muammar Gaddafi.

Haftar's self-styled Libyan National Army (LNA) has relied heavily on UAE air support, which includes the suspected deployment of Chinese-made Wing Loong II drones during its months-long offensive against the GNA.

170612080219306

A UN report released in November said the UAE also supplied Haftar with the Russian-made Pantsir S-1 advanced air defence system that was installed at the al-Jufra base near the town of Gharyan.

"The complexity and costs of the system make it very unlikely that the United Arab Emirates has supplied it to any other entity who could have subsequently transferred it to Libya," the report said.

A separate UN report in 2017 said the Gulf country built an airbase at Al Khadim in eastern Libya and provided Haftar with aircraft as well as military vehicles.

The UAE considers Haftar a trusted partner capable of curbing the spread of political Islam, most notably the Muslim Brotherhood.

"Abu Dhabi has no tolerance for political Islam, including its most moderate manifestations," Jalel Harchaoui, a research fellow at the Clingendael Institute and Libya expert, told Al Jazeera.

"The only way for them to sleep easy at night and be sure proponents of political Islam do not wield any power in Libya is to prop up strict autocracy instead.

"The fact that the Muslim Brotherhood happens to be very weak politically in Libya is not going to reassure or appease the Emiratis. The latter prefer erring on the safe side, by combating any form of democratic opening, whether legitimate, corrupt or dysfunctional."

Egypt

Like Abu Dhabi, Cairo's aversion to the Muslim Brotherhood has meant that it found in Haftar a natural ally.

President Abdel Fattah el-Sisi took power after a 2013 military coup that toppled Mohamed Morsi, Egypt's first democratically elected head of state and a member of the Brotherhood. The group was outlawed that same year and declared a "terrorist" organisation by Egyptian authorities.

For Cairo, the GNA's makeup, one that accepts the participation of groups such as the Brotherhood - already an important component of the UN-recognised government - in the political decision-making process, constitutes a major red line.

Haftar's endorsement by wealthy Gulf states, his military background and ability to rein in armed groups in eastern Libya's sparsely populated desert region have also earned him the support of el-Sisi.

Egypt has used its vast border with Libya to funnel weapons and provide logistical support to Haftar, according to Libyan officials and Egyptian foreign ministry documents seen by Al Jazeera.

During a recent trip to Cairo, Haftar - who received part of his military training in Egypt - said he would take over Tripoli "within hours" if Egypt were to send troops to assist his forces.

France

French President Emmanuel Macron has officially backed efforts for a peaceful solution to the conflict in Libya.

190423174812673

That stance, however, is counterweighed by France's diplomatic support for Haftar, which includes the blocking of a European Union statement calling on the renegade military commander to halt his assault on the capital, prompting GNA Prime Minister Fayez al-Sarraj in April to accuse the Macron administration of backing a "dictator".

There are also concerns that France is providing Haftar with military support.

Tunisia's border guard in April denied entry to 13 French nationals attempting to cross into its territory after the group failed to disclose weapons it had in its possession.

Quoting a "well-placed source" at Tunisia's presidential palace, Radio France International reported the men were not diplomats as claimed but intelligence agents.

In June, US-made Javelin missiles belonging to France were found at a base used by Haftar's troops in the town of Gharyan, located some 80km (50 miles) south of Tripoli.

In 2016, a French helicopter crashed near Benghazi, killing three soldiers, during what then-President Francois Hollande described as a "dangerous intelligence operation". The GNA said the incident was a "violation" of its sovereignty.

Russia

Much like France, Russia has publicly supported the UN's mediation efforts led by Special Envoy Ghassan Salame. Moscow, however, in April blocked a UN Security Council statement that would have called on the Libyan commander to halt his advance on Tripoli.

Russian mercenaries from the private Wagner group have also reportedly joined the battle alongside Haftar's forces.

Analysts say that, if true, this could not have happened without the Kremlin's greenlight and suggests a push by Russia to establish itself as a new power broker in the region.

"While Russia may lack the political capital to launch an Astana-like process in Libya, its gamble on the inaction of its counterparts may still position it as a power broker," wrote Emadeddin Badi, a non-resident fellow at the Middle East Institute, recently.

Moscow denies sending troops to back Haftar.

United States

The US was among the states that supported the efforts that led to the GNA's creation in late 2015. But soon after taking office in January 2017, US President Donald Trump said he did not see a "role" in Libya.

"I think the United States has right now enough roles. We are in a role everywhere," Trump said in April, 2017.

But Washington began to send mixed signals shortly after Haftar launched his offensive on Tripoli.

In an April 19 phone conversation with Haftar, who is also a US citizen, Trump recognised "Field Marshall Haftar's significant role in fighting terrorism and securing Libya's oil resources".

Washington in July blocked a UNSC statement condemning an air raid on a migrant detention centre that killed more than 40 people, which the GNA blamed on the US ally UAE.

Saudi Arabia

The Wall Street Journal (WSJ) reported in April that Saudi Arabia offered tens of millions of dollars to help fund Haftar's Tripoli offensive.

According to the US publication, the offer came during a visit by Haftar to the Saudi capital, Riyadh, in late March 2019, days before the launch of his assault on Tripoli.

Citing senior advisers to the Saudi government, the WSJ said the offer of funds, which Haftar accepted, was intended to buy the loyalty of tribal leaders, recruit and pay fighters and other such military purposes.

However, Riyadh, which views the Muslim Brotherhood with the same level of apprehension as the neighbouring UAE, has been bogged down by a conflict of its own in Yemen.

Sudan/Jordan

A report by the UNSC Libya sanctions committee in November accused Sudan and the head of Sudan's Rapid Support Forces (RSF), Mohamed Hamdan Dagalo, widely known as Hemeti, of violating UN sanctions by deploying 1,000 troops to Libya.

Citing Sudanese military commanders in Libya, The Guardian said in December that as many as 3,000 Sudanese soldiers were participating in Haftar's military campaign. They included fighters from the impoverished Darfur region.

Jordan is another country that is mentioned in the report.

Turkey

Turkey has been one of the GNA's foremost supporters since its inception in 2015.

Ankara has stepped up its military support for the GNA in the face of Haftar's military campaign.

In addition to armoured vehicles, the GNA was reported to have bought 20 Bayraktar TB2 drones from Turkey last summer.

Ankara has started deploying troops to Libya, President Recep Tayyip Erdogan said on Sunday, after parliament recently approved the move. He said the objective of the deployment was "not to fight" but "to support the legitimate government and avoid a humanitarian tragedy".

The move follows the signing of two agreements in November relating to maritime border demarcation and enhanced security cooperation between Ankara and the GNA.

The maritime border delineation deal is a way for Ankara to affirm its position as a leading power in the region, according to analysts, who are quick to point out that drilling rights in the contested seabed only tell part of the story.

"Turkey is going to Libya to make sure that any discussion in the Mediterranean includes Ankara because neighbouring countries are trying to exclude it," Samdi Hamdi, the editor in chief of the International Interest, told Al Jazeera.

"If Libya falls under Haftar, who is an ally of the UAE, which in turn is antagonistic to Turkey, that essentially puts all of Turkish maritime interests in the Mediterranean at the mercy of the UAE, Egypt and Greece."

Qatar

Qatar's dispute with its Gulf neighbours is reflected in the Libyan theatre where Doha supports a Tripoli government that is more tolerant of Islamist elements - such as the Muslim Brotherhood - than the Haftar-affiliated House of Representatives (HoR), which in turn enjoys the support of the UAE, Saudi Arabia and Egypt.

Doha had played a key financial and military role in the 2011 overthrow of Gaddafi but has since taken a backseat with its support for GNA tempered and limited to diplomatic backing.

Italy

Italy has maintained strict neutrality throughout the conflict raging across the Mediterranean.

Though supportive of the internationally-recognised GNA, Rome advocates for a comprehensive peace process that would incorporate all segments of Libyan society, which it knows well as the country's former occupying power.

In April, Italy's then-Interior Minister Matteo Salvini warned France against supporting any of the warring factions for "economic or commercial reasons" after Paris blocked the EU's call for restraint.

Analysts say Italy is concerned France is trying to usurp Italian oil giant ENI's privileged position in the North African country.