Syria is often called Russia’s last remaining ally in the Middle East, and Moscow’s continuing refusal to support the United States, the European Union, and the Arab League in condemning the Assad regime certainly appears to support that claim. The reasons cited for Russia’s allegiance to Damascus are many: Russian Prime Minister Vladimir Putin and Syrian President Bashar al-Assad are said to have a sort of autocratic solidarity, with Putin afraid that the Arab Spring encourages challenges to his own rule; at the same time, Russia is thought to have major economic interests in Syria, including arms contracts, a Russian-leased naval base, and plans for nuclear energy cooperation.

There are elements of truth in all these assertions -- but they offer only glimpses of the broader picture. Moscow’s position on Syria is shaped even more by the recent experience of Libya, strong doubts concerning the Syrian opposition, and suspicions about the motives of the United States.

Damascus was Moscow’s ally in the Cold War, when the Soviet Union was engaged in a confrontation with the United States, Israel, and “imperialism” writ large. Under Hafez al-Assad, Bashar’s father, the Soviets equipped and trained the Syrian military. Although the elder Assad was difficult to control and managed to get more from the Kremlin than the other way around, he could be relied upon not to bolt to Washington’s side, as did Egyptian President Anwar Sadat. Beginning in 1973, after Egypt’s disastrous defeat in the war against Israel and Sadat’s embrace of U.S. mediation, Syria became the centerpiece of the entire Soviet position in the region, remaining so through the end of the Cold War.

The Russia that emerged from the Soviet collapse had hardly any geopolitical ambitions in the Middle East. In 1972, preparing for his political break with Moscow, Sadat sent home 20,000 Soviet military advisers and their dependents. Four decades later, in February 2011, as Sadat’s successor, Hosni Mubarak, was toppled, some 40,000 Russian vacationers were stranded in the Egyptian cities of Hurghada and Sharm el-Sheikh. This, in a nutshell, reveals the difference between the Soviet and Russian involvement in the Middle East: A region where the Soviets once showed off their military muscle and influenced political developments had become a place for ordinary Russians to go for a visa-free budget vacation and a suntan.

Syria somewhat bucked this trend: Its continued relationship with post-Soviet Russia was largely due to the fact that Syria needed arms and Assad did not trust the United States. Today, Russia’s material interests in Syria are real, though limited. Damascus continues to purchase a wide range of Russian arms, from tanks to aircraft and air defenses, but Syria does not represent a big or particularly lucrative market for these exports. In order to sell its armaments, Russia has had to extend credit to Syria and forgive Damascus its multibillion-dollar debt to the Soviet Union. When Russian President Dmitry Medvedev visited Damascus in 2010, he offered to build a nuclear reactor in Syria, but that work has not even started. And Moscow maintains a naval resupply facility at the Syrian port of Tartus, which it last used a few weeks ago, when the Russian navy’s only aircraft carrier was sailing from the Arctic to the Mediterranean. These bilateral interests are supported by the personal connections between Russian military officers, arms traders, and diplomats and senior members of the Assad regime.

But these shared interests are not the only reasons why Russia has been unwilling to join the West in condemning Assad at the UN Security Council. Moscow has learned its lesson from how events unfolded in Libya last year. It abstained during the crucial UN vote on intervention in Libya, thus allowing the adoption of the resolution calling for a no-fly zone over Libya, which was meant to prevent an impending massacre in Benghazi. The Russian government wanted to help its partners in the United States and Europe, whom Russia needs for its plans for economic modernization. To be sure, Russia did have some material interests in Libya -- contracts for military arms and railroad contracts -- but it certainly did not want to be seen as Muammar al-Qaddafi’s defender.

The NATO no-fly zone soon led to an offshore war against the Qaddafi regime. As Russian officials argued, vicious as the Qaddafi government may have been, the war’s long agony resulted in a number of deaths among civilians, if not so much in Benghazi, as once feared, then in Tripoli and in Qaddafi strongholds such as Sirte. As Moscow sees it, the foreign militaries that intervened bear at least some responsibility for those deaths. And so far, the new Libyan regime has proved far less secular than the one it replaced, with some of its leaders suspected of having links to al Qaeda. It also has been unable to control Qaddafi’s abandoned arsenals, or even preserve unity in its own ranks. What was billed as a revolution seemed to many in Moscow to be a civil war that replaced a dictatorship with chaos.

But Libya has always been peripheral to Middle Eastern geopolitics. Syria, however, is different. A civil war there, which has in effect already begun, could unsettle the entire region, above all in Lebanon but also in Jordan and Iraq. Israel, too, may be affected should Damascus encourage Palestinian militants or Hezbollah fighters to attack Israeli settlements or outposts. Iran, Syria’s ally, is already being drawn into the fray, with the Assad regime’s Alawite core coming under attack from mainly Sunni opposition. Syria is Bahrain in reverse -- a Sunni majority that feels oppressed by a relatively small sect that many believe is closer to the Shiites. Recent events in Syria and Bahrain have caused the regional divide between Sunnis and Shiites to become more pronounced, heralding a possible clash between Saudi Arabia and Iran. As strategists in Moscow see it, the conflict in Syria, the sectarian violence in Iraq, and the aborted revolution in Bahrain are the proxy battlefields where the struggle for regional primacy is being fought.

As a result, where much of the Western world now sees a case for human rights and democracy, and where the Soviets in their day would have spotted national liberation movements or the rise of the masses, most observers in Moscow today see geopolitics. Russian government officials and commentators close to them explain Western behavior in rather cynical terms: Washington let go of a long-time ally, Mubarak, in order to retain influence in Egypt, waged a war in Libya to keep oil contracts, and ignored the Saudi intervention in Bahrain because the U.S. Fifth Fleet is based there. And now, the United States is trying to topple Assad to rob Iran of its sole ally in the Arab world. The Russians themselves have no dogs in these fights, but they do not want to bandwagon on a U.S. regional strategy that they believe is a losing and dangerous proposition.

For all their outward coolness, Russia’s foreign policy strategists continue to be preoccupied with the United States, watching its every move. They were unpleasantly surprised when the United States decided to intervene in Libya and are now suspicious of U.S. plans for Syria. The Kremlin is concerned about a war between the United States and Iran, which is visibly drawing closer. Moreover, with all the problems Moscow faces in the perpetually troubled North Caucasus (and the threat of violent destabilization it may one day face in Central Asia), Russia does not relish the prospect of more conflict in the Muslim world should the United States -- alone or with its allies -- strike again in the Middle East. The forthcoming U.S. withdrawal from Afghanistan and the likely return of the Taliban to Kabul already present enough worries.

Russia is not blameless: It lost too much time watching others and then criticizing them without shaping an active role for itself. Late last month, Moscow invited the Syrian government and the opposition for talks. This move came much too late. The opposition wants to hang Assad, not negotiate with him. Perhaps last year the response might have been different.

Yet Moscow chose not to use even the limited influence it had with its supposed ally in Damascus. Inaction has had its price: Over the last year, Russia has faced the simultaneous opprobrium of the Western public, the Arab street, and the conservative Gulf regimes. And now it has maneuvered itself into a position in which it must bet on Assad’s survival to protect its interests. Moscow needs to learn that saying no is not good enough and that in global politics timing is everything.