ROME — Italy is doing business with Libyan military commander Gen. Khalifa Haftar, despite backing his militia foes, in a bid to protect Italian military forces now on the ground in the lawless country.

Italy cooperated with Haftar's forces this week for the smooth delivery of a shipload of 700,000 barrels of oil by tanker to Italy, said Italian security expert Nicola Pedde.

Italy officially supports Libya's UN-backed government, as well as militias supporting it, which are in turn hostile to Haftar's forces and a parliament in the eastern city of Tobruk, which backs the general.

Italian Foreign Minister Paolo Gentiloni warned in March that talks with Haftar were not on the agenda.

Italy announced it would send 200 troops to Libya last month to provide security for an Italian field hospital set up in Misurata for the UN-loyal militias, who are currently fighting Islamic State militants in Sirte.

Haftar, despite pledging to help eject Islamic extremists from Libya, has stayed away from the fight in Sirte, preferring instead to take possession of three oil facilities, allegedly through payoffs to the militias controlling them.

Italy’s new decision to work with Haftar was indicated by the shipment of oil bound for Italy this week from one of those facilities, Ras Lanuf, said Pedde, who is the director for the Institute for Global Studies think tank in Rome.

Meanwhile, on Oct. 5, Gentiloni held talks in Rome with Ali al-Qatrani, an emissary of Haftar.

"We agreed with the US to be more active on the ground in Libya, but we are in a difficult position in Misurata where the Italian presence was not welcomed by Haftar," Pedde said. "His forces have not been sending friendly signals."

The Misurata militias’ five-month campaign against ISIS in nearby Sirte, which was backed by US bombing, is now reaching its conclusion, with ISIS forces trapped in an area just 1 kilometer long after door-to-door fighting.

"The body counts are revealing that the total number of fighters there was less than predicted, perhaps just 1,200," Pedde said.

Nevertheless, the campaign has weakened the Misurata militias, he said.

"Mine clearance in Sirte has also caused injuries — the threat now is that the militias are vulnerable to an attack by Haftar."

Pedde said the distance between the two forces is as little as 1 kilometer.

"Misurata cannot sustain another campaign. Italy is clearly on the ground supporting them, and we not perceived as neutral," he said. "Thanks to this dangerous ambiguity, the oil shipment was a signal to open dialogue with Haftar and reduce tensions."

Pedde said it was unclear where payment for the oil would be heading, but said: "It is difficult to believe it is all going to the UN-backed government."

Following an uprising in 2011, at the time of the Arab Spring protests across the Middle East, the government of Moammar Gadhafi was overthrown with the assistance of a NATO bombing campaign.

Since then, fledgling attempts at democracy have broken down, with a moderate Muslim government forming in the capital Tripoli, in opposition to a rival parliament in Tobruk in the east.

A UN-backed government was then set up this year, which won the support of Tripoli, but not Tobruk, which counts on Haftar for military support.

Haftar and Tobruk have received backing from neighbouring Egypt as well as Saudi Arabia and the United Arab Emirates. Fellow Gulf state Qatar backed Tripoli.

"Qatar was willing to pursue a strange dream of finding a Muslim intelligentsia in North Africa," Pedde said. "But there was no option on the ground and realized the Muslim Brotherhood was the only reality."

The Muslim Brotherhood is a Sunni Muslim organization that has been accused of anti-government activity in Egypt.

"Qatar’s support for the Brotherhood provoked a huge backlash from the Saudis and the UAE, which have used Egypt as a proxy in Libya and chosen Haftar as their strongman," Pedde said.

With no central, functioning government since 2014, Libya has fallen into lawlessness. Taking advantage, people smugglers have amassed fortunes sending migrants across the Mediterranean to seek new lives in Europe.

More than 140,000 have arrived in Italy so far this year, with more than 3,000 drowning during the crossing.

Tom Kington is the Italy correspondent for Defense News.

More In Mideast Africa