Russian President Vladimir Putin's first visit outside the former Soviet Union since the beginning of the Ukraine crisis will be to China, Shanghai to be precise. This is significant because Russia's relations with China are on the rise, in contrast to its relations with the West, which have deteriorated virtually to Cold War levels. Putin has even gone to extent of publicly praising Beijing's stance on the Ukraine crisis.

The Russians realize that the Chinese do not particularly like sudden border changes that impinge on territorial sovereignty, or great-power confrontations that can be disturbing to other countries. But they also appreciate that China abhors political interference resulting in regime changes even more. Thus, they see China's neutrality in the Ukraine crisis as a "plus" for them.

The evolving confrontation between Russia and the United States is being largely waged in the fields of economic sanctions and information warfare. US trade relations with Russia are fairly weak ($26 billion in bilateral trade in 2013), so Washington is pressing the European Union countries (with $370 billion in trade with Russia in 2013) to hit Russia hard.

The Europeans, so far, have balked at taking measures which would also hurt themselves, but they are also seeking ways to reduce their dependence on energy imports from Russia. China, in contrast, is a major economy which is essentially immune to US political pressure; it is also a growing energy market. Russia's trade with China ($88 billion) is less than that with the EU as a whole, but higher than with any one EU member state. Sooner rather than later, Gazprom will have to compromise on the price of its gas for China, but flexibility in the gas trade has its geopolitical and economic uses.

Putin's visit to China will coincide with the joint Sino-Russian naval exercises. These are held regularly, with the last being in the Sea of Japan off Vladivostok. This time, the venue is the East China Sea, where the territorial dispute between Beijing and Tokyo over the Diaoyu Islands (Senkaku Islands in Japanese) has heated up.

The Russians, by not objecting to the area where the maneuvers will be held, are sending a message to Japan that signing up for US-ordered sanctions against Russia would entail a cost. In a public statement in March, Putin made it clear that Moscow does not intend to conclude a military alliance with Beijing, but the mere invocation of that possibility is a signal that the vector of Russian foreign policy has changed dramatically. Only four years ago, then president Dmitry Medvedev - with then prime minister Putin squarely behind him - were offering a "joint defense perimeter" to NATO. Today, NATO again considers Russia an adversary, and vice-versa.

The Ukraine crisis came in part as a US response to Russia's growing toughness, as evidenced, for example, in its handling of the Syrian crisis and the Edward Snowden affair. Putin believes the era of US global dominance is coming to an end.

Pursuant to that conclusion, Russia's foreign policy has been seeking ways to strengthen ties with leading non-Western powers, above all China and India, and other emerging economies, from Brazil to Egypt to Indonesia to Iran. This will not be easy, in view of Russia's relatively weak and currently stagnant economy, but not entirely impossible, because in fields such as armaments and nuclear energy, space technology and grain exports, Russia continues to be a leading player.

A veteran, among other engagements, of the Great Game, the two world wars and the Cold War, Russia has few illusions about international politics. It clearly sees the damage that the current confrontation with the US has inflicted upon it. It deplores the breakdown in its relations with the EU and its leading power, Germany. It understands power balances, and knows it now has a much weaker hand than what it had even a year ago in dealing with China. Yet it will not back off. Instead, it will press ahead with its agenda aimed at restoring Russia's role as one of the leading global players.

It is not clear whether Russia will succeed in this endeavor. To succeed, it will have, above all, to address its flaws and weaknesses, from corruption and stifling economic monopolism to the low education and health standards of its population. The key factor will be the quality of the Russian elite, too preoccupied since the fall of the Soviet Union with making themselves rich by any means available. The emergence of a truly national and modern elite is a sine qua non for Russia getting its act together.

The author is the director of the Carnegie Moscow Center.