There was an unmistakably satisfied grin on Russian President Vladimir Putin's face as he presided over the opening ceremony of the Winter Olympics 10 days ago.
Why not? After a long decline on the international stage, quite a lot is going Russia's way.
Moscow matters again. And, to the consternation of leaders in the West, Russia under Mr. Putin sees its interests – on almost every major file, from Egypt to Syria to Ukraine – as being the opposite of whatever the United States and European Union want.
Take Ukraine. Many in the West saw Mr. Putin's hand at work as President Viktor Yanukovych resisted calls to resign – or adopt constitutional changes demanded by the opposition – before ordering his security forces into battle on Tuesday. At least nine people have been killed so far in the clashes between demonstrators and police, and more violence is feared.
Mr. Yanukovych's spine was almost certainly stiffened by the release of $2-billion in promised Russian aid earlier on Tuesday, money that had previously been frozen a week earlier as the Kremlin expressed concerns over Mr. Yanukovych's concessions to the opposition, which included accepting the resignation of Prime Minister Mykola Azarov.
But the Kremlin has rebuffed accusations of interference in Ukraine, instead accusing the U.S. and EU of trying to expand their "sphere of influence" into the former Soviet republic. (That interpretation was bolstered when someone – almost certainly with the help of the Russian intelligence services that Mr. Putin once served in – uploaded an audio recording of Assistant Secretary of State Victoria Nuland and U.S. ambassador to Ukraine Geoffrey Pyatt discussing which opposition leaders should be in government if and when Mr. Yanukovych is finally ousted.)
Last week, Mr. Putin was smiling again as he hosted Egypt's military boss, Field Marshal Abdel Fatah el-Sisi, in the Kremlin – a visit that was another symbol of Moscow's restoration as an alternate centre of gravity on the international stage.
Two years ago, the Arab Spring looked like an enormous geopolitical loss for Russia. Libya's Muammar Qadafi was gone and an even closer strategic ally, Syria's Bashar al-Assad, looked likely to follow.
The protest virus that had spread through Tunis, Cairo and Damascus infected the streets of Moscow, where tens of thousands turned out to protest Mr. Putin's planned third term in the Kremlin. A Russian political scientist told me in late 2011 that by trying to remain in power, Mr. Putin had put himself "on the wrong side of history."
But that version of history has since been turned on its head. Mr. Putin won reelection and faced down the protesters in Moscow. He again stands almost unchallenged on the Russian political landscape. And after four years of trying to make nice with the West – while Dmitry Medvedev was president and Mr. Putin in the theoretically junior post of prime minister – the Russian bear has its geopolitical snarl back.
It was Mr. Medvedev who allowed the passage of the UN resolution that authorized the NATO no-fly zone over Libya, a supposedly humanitarian operation that rapidly expanded into air strikes in support of the armed opposition. The lesson Mr. Putin took was that cooperating with the West had resulted in a strategic loss for Russia. It was a mistake he wouldn't repeat.
The Kremlin's decision to stand by Mr. Assad even as he turned his guns, and chemical weapons, against his people made Russia many new enemies in the Arab world (which may yet prove disastrous), but it also helped ensure a bloody stalemate in Syria in which no political or military resolution is possible without Moscow's support.
The West found itself in the awkward position of cheering the rise of democracy in the Middle East, then stepping back in concern as Egyptians predictably elected the Muslim Brotherhood, and international jihadis flocked to join the anti-Assad war in Syria. Now, as the region veers back towards familiar authoritarianism, Russia looks like the power that kept to its principled, if self-interested, position.
Field Marshall el-Sisi was transparent about his intentions in Moscow this week. He's grown tired of American pressure to restore genuine democracy – pressure that has come with threats of reduced military aid – so he's seeking to restore Cairo's Cold War-era friendship with Moscow. Before the rise of Anwar Sadat, and the U.S.-brokered aid-for-peace deal with Israel, Egypt bought Russian military hardware and sent its officers (including, once upon a time, Mr. Mubarak) to Moscow for training.
Field Marshall el-Sisi reportedly left Moscow with a $20-billion arms deal, as well as Mr. Putin's endorsement of a presidential run that the Field Marshall hadn't formally announced yet. "I know that you have made a decision to run for the post of president of Egypt. It is a very responsible decision to assume this mission and responsibility for the fate of the Egyptian people," Mr. Putin said, before gifting Field Marshall el-Sisi with a black winter coat with a red star on the sleeve.
Mr. Putin and the Egyptian army boss share a worldview. Islamists, whether they be the political kind who won Egypt's only free election, or the violent kind who plant bombs on Russian trains, pose a mortal threat and should be dealt with accordingly.
And both men see the Arab Spring, and the protests in Kiev and Moscow, as American-sponsored attempts to install Washington-friendly governments.
Ukraine is closer to home and dearer to Mr. Putin than the Middle East. He stood by Mr. Assad this long; it's certain he'll back Mr. Yanukovych whatever happens next.
Follow me on Twitter: @markmackinnon