The Middle East has a new kingmaker.

For a quarter-century after the breakup of the Soviet Union, Russia was almost entirely absent from the region. Today, it has become a top player, with a formidable military footprint and good relations with all the major opposing protagonists, from Israel to Saudi Arabia.

Things certainly seem to be going Vladimir Putin’s way. The Russian leader celebrated Orthodox Christmas on January 7 with his first visit to Damascus since his air force began bombing rebel targets in 2015, to take full stock of Russia's success in changing the course of the conflict.

It’s likely he was pleased by the visit. The rebels are now being pounded by airstrikes in their last bastion of Idlib (despite a recent cease-fire), the Islamic State is cowering in tiny remnants of its so-called caliphate, and the United States and its Kurdish allies have retreated to the far east of Syria, leaving Russian troops to take control of their vacant bases.

While the Arab Spring was celebrated in the West as a wellspring of democracy, Putin saw it as an invitation for chaos and destabilization.

Putin then traveled to Turkey, where he and Turkish leader Recep Tayyip Erdoğan announced they had agreed a cease-fire between the two main warring groups in Libya, the leaders of which then came to Moscow for negotiations meant to solidify the truce.

Libyan National Army commander Khalifa Haftar — whose forces have been pushing toward Tripoli since April with the help of Russian mercenaries — may have left without signing the agreement, but the negotiations showed that the Kremlin will play a leading role in any attempts to mediate the conflict. Indeed, German Chancellor Angela Merkel had visited Moscow just days earlier to win Putin's backing for a conference on the Libya crisis in Berlin on Sunday.

But if the Russian leader is seemingly everywhere in the Middle East now, it’s hard to see any ideological strategy or pin down any overarching goals, although his well-known antipathy to regime change certainly plays a role. And while Russia is making money on arms and infrastructure contracts, it was doing that even before it became the go-to regional mediator.

Instead, Putin's approach appears to be one of political opportunism. As Western countries draw down their presence in the Middle East, he has seized opportunities to restore Russia's clout as a major power and add weight to its demands around the world.

* * *

While the Soviet Union was for years the top arms supplier to the Middle East as it backed Arab states in their conflicts with Israel, the disastrous invasion of Afghanistan arguably hastened its breakup, and Russia under Boris Yeltsin and then Vladimir Putin had little appetite for such meddling.

Two events, both in 2011, set Putin on a path back to the Middle East and forged a worldview that continues to frame his decision-making there today.

The first was the Arab Spring, followed by similar free elections protests in Moscow later that year.

While the Arab Spring was celebrated in the West as a wellspring of democracy, Putin saw it as an invitation for chaos and destabilization, a view that was only confirmed as the Muslim Brotherhood came to power in Egypt and Libya descended into infighting.

For Putin, Gaddafi's downfall demonstrated once and for all the perfidy of Washington and its European allies.

Putin, who had already seen pro-Western governments come to power in “color revolutions” in Ukraine and Georgia, viewed the protests as a further rehearsal for a supposed U.S.-backed regime change in Russia. He accused then-Secretary of State Hillary Clinton of inciting the Moscow demonstrations and argued that such uprisings foment nationalism and Islamic extremism.

The second was the United Nations vote to establish a no-fly zone in Libya and begin a bombing campaign leading to the demise of Muammar Gaddafi, who had been a friend of Putin’s since he pitched his Bedouin tent in the Kremlin gardens during a 2008 visit.

At Barack Obama's request, then-Russian leader Dmitry Medvedev abstained from the vote without consulting Putin, who was then briefly serving as prime minister to get around a constitutional term limit. Putin lashed out at the decision and became even more furious when Gaddafi was killed, saying “it was impossible to watch [the footage] without disgust.” He later claimed Washington had orchestrated the murder.

For Putin, who had once suggested that Russia could join NATO or even the eurozone, Gaddafi's downfall demonstrated once and for all the perfidy of Washington and its European allies and the folly of trying to appease them.

Back in the presidency, Putin watched with growing unease as Syria spiraled into civil war and the Islamic State seized large swathes of territory. Yet while he opposed the West's encouragement of popular uprisings in the Middle East, he didn't take action until 2015, when Syria offered a way out of a political impasse in Europe.

After Moscow’s 2014 annexation of Crimea, the Obama administration had slapped sanctions on Russia and refused to compartmentalize the Ukraine crisis, tying all issues to Russia's behavior there. Then Assad asked Syria's old ally Moscow for help fighting Islamic extremism.

Russia began sending tanks and artillery, deployed warplanes to Hmeimim airport and dispatched naval ships to the Mediterranean under a plan that was reportedly hashed out by Qassem Soleimani, the Iranian general assassinated by the United States earlier this month.

In September 2015, Russia launched airstrikes that Putin announced were meant to support Damascus “in its legitimate fight with terrorist groups,” but which also targeted U.S.-backed rebels. With its jets flying up to 100 sorties a day, Assad was able to take back most of the country.

Russia preserved its only foreign naval base, a Soviet holdover at Tartus, and its main ally in the Middle East — but Putin’s real victory was in the diplomatic arena.

Just as Assad's losses were reversed, so was Russia's frozen dialogue with other countries. Almost overnight, it went from pariah state to a key member of the club of nations deciding world events.

“Syria brought Russia outside the post-Soviet space and made it a visible power in the global context” — Dmitri Trenin, head of Carnegie Center Moscow.

While in 2014, other leaders had refused to sit with Putin during dinner at the G20 summit in Brisbane, by 2016, the U.S. secretary of state was at the negotiating table with Russia's foreign minister in Geneva, agreeing on a cease-fire in Syria and joint bombing raids against ISIS.

“Syria brought Russia outside the post-Soviet space and made it a visible power in the global context,” said Dmitri Trenin, head of Carnegie Center Moscow.

“After Syria, they started to talk about Russia as a competitor with the United States, a country that was overturning the world order. Libya is a further development in this trend.”

“Putin wants to make the point that, unlike Obama, he does not view Russia as a 'regional power,' even though Moscow does not have the wherewithal for large-scale power projection,” said Vladimir Frolov, an analyst who previously worked at the Russian embassy in Washington.

* * *

But if Russia's intervention in Syria started with a bang, its involvement in the rest of the region has been much murkier.

With the bloody quagmire of Afghanistan still fresh in many Russians' minds, Putin was careful to promise no boots on the ground in Syria. But as Moscow’s involvement grew, it had to get creative to run its war.

The Wagner private military company linked to “Putin's chef” Yevgeny Prigozhin, who would soon be sanctioned for interfering in the U.S. election, deployed hundreds of fighters to Syria, former mercenaries have said. The Kremlin denied their presence, even after dozens of them were blown up in airstrikes as they approached a U.S.-Kurdish position in Deir Ezzor in 2018.

This has also been the recipe for the Russian involvement in Libya. Prigozhin attended a 2018 meeting in Moscow between Haftar and the Russian defense minister. By the spring of 2019, according to U.K. intelligence, 300 Wagner mercenaries were backing the Libyan commander. Western governments believe Wagner has been sending arms, tanks and drones to Libya for more than a year.

Putin has disavowed any connection to Russian citizens fighting in the country, but has been happy to use the bargaining power they've imparted to him. Hence the peace negotiations with Erdoğan, who sent military advisers to Tripoli in early January to support the U.N.-backed government of Fayez al-Sarraj. And because Libya is the last major thoroughfare of people-smuggling to Europe, Western leaders like Merkel are also eager to recruit Russia's influence to resolve the conflict, as her visit to Moscow showed.

“The main task is not to enter Tripoli on the shoulders of Haftar's army, but to become the peacemaker between Haftar and Sarraj,” Trenin said. “Happily, the United States is not participating actively, so a vacuum has been created, and Russia is using it.”

For Putin, political and economic interests are closely intertwined in the Middle East.

Speaking with journalists on Friday, Russia's foreign minister admitted that Haftar had “asked for additional time” before signing the truce agreement negotiated over eight hours in Moscow, but claimed that the ceasefire announced by Putin and Erdoğan was holding. He said Russia had taken part in drafting an agreement for the Berlin conference and would push for it to be signed.

* * *

The idea of Russia ending the chaos unleashed by the 2011 Western intervention must be one Putin relishes. But it’s also good business for Russia, which lost a railroad project and other lucrative contracts when Gaddafi fell.

Russian mercenaries are already reportedly guarding several Libyan oil fields, and once the black gold starts flowing again, Tripoli could become a major buyer of Russian arms just as it was under Gaddafi.

For Putin, political and economic interests are closely intertwined in the Middle East.

One early dividend of the Syria operation were the agreements that Russia and Saudi Arabia began in 2016 to cut oil output and boost prices — negotiations made possible by Moscow's newfound clout in the region, according to Fyodor Lukyanov, a leading analyst and chairman of Russia's Council for Foreign and Defense Policy.

Now, as the United States draws down its forces in Iraq, Russia’s economic successes have put it in a position to gain political influence in yet another Middle Eastern country.

Moscow has quietly invested $10 billion into Iraq’s energy sector in the past decade and is developing several promising oil and gas fields. It also signed a $4.2 billion arms deal with Iraq in 2012 and has been delivering tanks, attack helicopters and missiles to the country. And after the U.S. killing of Soleimani, Iraq's ambassador to Iran said Baghdad was once again discussing a purchase of advanced Russian surface-to-air missiles.

But the biggest benefit for Putin from all these ventures is not money, military bases or influence in the Middle East. It's the ability to make Russia's demands more assertively in regions closer to home.

What Putin wants in the Middle East is a better hand of cards in Europe and Asia.

“The stronger Russia is in the world, the easier it can achieve its policies in Eurasia, from Europe to China,” said Lukyanov.

“Since Russia has a weak economy, it needs to compensate in other spheres, with diplomacy, military force and the ability to solve different issues. In this, Russia is surpassing all others.”