(Bloomberg) -- Khalifa Haftar was expecting the Kremlin red carpet. Instead he was cooped up in a Russian Foreign Ministry reception building hoping for an audience with Vladimir Putin. In the end, the Libyan military commander lost patience and stormed out. Hours later, he left Moscow in his Dassault Falcon corporate jet bound for the Jordanian capital, Amman.

When the Russian president invited Libya’s rival leaders to sign a truce on Monday, it would appear he hadn’t factored in the legendary stubbornness of the 76-year-old Haftar. What’s more, that he felt emboldened to snub Putin is testament to how unpredictable Libya’s civil war has become.

The flash of temper, however, is only the latest confounding twist before a planned Libyan peace conference in Berlin on Sunday. Just last week, an attempt by former colonial power Italy to broker an encounter between Haftar and Fayez al-Sarraj, prime minister of the United Nations-backed Libyan government, ended with the latter canceling last minute and flying home.

Nothing is playing out as planned, or is what it seems.

Haftar, who is based in eastern Libya, started the latest war in April with an offensive on the capital, Tripoli, to topple Sarraj. He’s now the one throwing up obstacles after his rivals, pressured by their patron Turkey, signed a cease-fire agreement in Moscow. Haftar said he’d sleep on it, but before the entirety of the slight to Putin became apparent, he was already gone.

“This won’t be forgotten by Putin,” said Kirill Semyonov, a Libya expert at the Kremlin-founded Russian International Affairs Council. “Haftar practically ran away when he was expected to sign the document. This showed a lack of respect to his hosts and is a blow to Russia’s reputation.”

The backdrop to all this is Russia and Turkey’s aggressive push into Syria. Relatively minor actors when the Arab protests erupted a decade ago, Moscow and Ankara are staging a dramatic shift in influence in the region. With the U.S. and Western Europe retreat, they have become key players in a game of geopolitical chess in which they are by turns allies and foes. The prize of a peace deal could also include the revival of billions of dollars in contracts that were abandoned in the chaos after Muammar Qaddafi’s overthrow in 2011.

The setback for the Kremlin came less than a week after Putin moved to take the upper hand in ending the conflict, together with Turkish President Recep Tayyip Erdogan. Russian officials say they remain cautiously optimistic that Haftar will come back to the table.

The two powers, though, have found themselves stymied by the myriad conflicting interests in Libya, just like Italy, France and other would-be peacemakers.

Not Surprising

Western and Arab diplomats who worked on Libya for years said they weren’t surprised. Haftar launched his battle for Tripoli during a visit by the UN secretary general and just before scheduled peace talks. The question is whether Putin and Erdogan allow him to get away with it.

Haftar started his offensive with the backing of Egypt and the United Arab Emirates, who saw him as irksome ally but the best bet for a strong leader in the tumultuous North African oil state. It evolved into a proxy war with Russia sending mercenaries to fight for Haftar and Turkey supporting Sarraj’s Tripoli-based government.

It would only be a matter of time before Putin and Erdogan made a deal to carve out their interests — much as they’ve done in Syria — then strong-arm their clients into a truce, a Russian official told Bloomberg early last year.

That moment came on Jan. 8. After Turkey threatened to step up its backing for Tripoli with a major military deployment, Putin and Erdogan met in Istanbul and called for a ceasefire 72 hours later.

Caught Unaware

Neither side had bothered beforehand to consult the Libyans, Egypt, the U.A.E, or UN, which had been working on a ceasefire since April, officials familiar with the talks told Bloomberg.

A senior official in the Tripoli-based government hastily boarded a flight to Istanbul to try and understand what had just happened, two officials said. Putin then reached out to the leaders of Egypt and the U.A.E, which backs Haftar with its airpower, by phone.

Egypt and UAE were not on board with the deal, which they believed gave Turkey too many concessions, an official said.

A Turkish official with knowledge of the Moscow meeting said a ceasefire could enable Turkey and Russia to cooperate in the exploration of oil and gas. It would also protect a maritime agreement Turkey extracted from the Tripoli-based government in return for military assistance, the person said. That deal is disputed by Greece and other European countries who fear Turkish and Russian encroachment into Mediterranean waters.

Read More:  What’s Behind Nine Years of Turmoil in Libya

In all of this, the U.S. appears to have been outmaneuvered by Russia in yet another Middle East conflict.

Washington had been sending mixed messages to both sides until hundreds of Russian mercenaries arrived in September to the frontlines to support Haftar. Weeks later they or Libyans manning a missile defense system shot down a U.S drone, whose wreckage has yet to be retrieved. The U.S. then began pushing Haftar for a cease-fire and hoping for a peace deal that would squeeze out Russia, several officials with knowledge of their meetings told Bloomberg.

That Haftar balked in Moscow was down to plans for a Turkish and Russian mission to enforce the truce and a clause in the document that might require him to pull back from areas he controls on the outskirts of Tripoli, a person in Moscow with knowledge of the talks said. Russia overestimated its ability to influence the Libyan military leader, the person said.

Erdogan, who has obtained parliamentary approval for a large-scale military intervention, responded to Haftar’s walk-out by threatening to teach him a “lesson.” One Turkish official wasn’t ruling out the use of Turkey’s F-16 jets.

The Russian Defense Ministry, meanwhile, isn’t giving up just yet. It said Haftar needs more time and suggested it expected him to respond positively ahead of the peace summit scheduled in Berlin, where even more surprises could await.

--With assistance from Caroline Alexander, Henry Meyer and Zainab Fattah.

To contact the authors of this story: Samer Al-Atrush in Cairo at skhalilalatr@bloomberg.netIlya Arkhipov in Moscow at iarkhipov@bloomberg.netSelcan Hacaoglu in Ankara at shacaoglu@bloomberg.net

To contact the editor responsible for this story: Flavia Krause-Jackson at fjackson@bloomberg.net, Rodney Jefferson

©2020 Bloomberg L.P.