"China is our reliable friend," Russian President Vladimir Putin said on Monday in an interview before a conference in Shanghai. "To expand co-operation with China is undoubtedly Russia's diplomatic priority."
Most evaluations of the Sino-Russian bilateral relationship begin by reciting the historical border disputes, the rift between Mao Zedong and Nikita Khrushchev, opening to China by Richard Nixon, and the perennial problem of reaching an agreement on gas pricing.
But these are all essentially backward looking and ignore the growing community of interests between the two countries. The case for a closer relationship on energy, trade, security and diplomatic issues is compelling.
In the energy sphere, the two countries are an almost perfect match: the world's largest net energy exporter and its second largest net energy importer with a long land border.
China is already Russia's largest single trading partner, with bilateral trade flows of US$90 billion in 2013, and the two neighbours aim to double the volume to US$200 billion by the end of the decade, according to Xinhua.
The Obama administration's strategic pivot towards Asia and shifts in the energy market are pushing China and Russia closer together as both react to fears of encirclement and energy security.
Russia's political disagreements with the United States and its allies over Ukraine as well as China's territorial disputes in the East and South China seas have left them isolated and searching for friends to counterbalance Washington's network of alliances in Europe and the Pacific. It is classic balance-of-power politics. My enemy's enemy is my friend.
Yesterday, the Russian and Chinese navies began seven days of joint exercises in the East China Sea. It is the third time the two navies have held joint drills since 2012, according to Xinhua, and underscores the increasingly close co-operation between them as relations with the Western powers deteriorate.
There are no real obstacles to a diplomatic rapprochement between Beijing and Moscow. There are no significant territorial disputes between the two countries over their land border or at sea. China's disputes are all far to the south.
Russia and China both have territorial disputes that pit them against Japan, over the Kurile and Senkaku/Diaoyu islands respectively, giving them an element of common interest. Both have reason to be wary of the active foreign policy of Japan's rightist Abe administration.
In other parts of the world including Africa, the Middle East and Latin America, there are no significant issues on which they are on opposite sides. For the most part their interests coincide or are in different areas, which makes it easy to maintain cordial relations. By contrast, there are plenty of issues on which they find themselves on the opposite side from the United States.
On energy, there is a clear convergence of interests. Russia needs to diversify the markets for its oil and gas, while China needs energy supplies that do not have to pass through transit choke-points like the Strait of Malacca.
Speaking to Chinese journalists on Monday, Putin confirmed negotiations over natural gas exports to China had entered the "final phase".
"For Russia, implementing these agreements means diversifying gas supply destinations, while for our Chinese partners ... it could be a remedy for energy shortage and ecological problems," Putin said.
Even without the crisis over Ukraine, Russia has been depending too heavily on oil and gas exports to Europe, leaving it vulnerable to pricing disputes with customers, pipeline disputes with transit countries, falling European demand and shifts in European energy policy.
Europe accounted for 80 per cent of Russian oil exports in 2012, while just 18 per cent went to Asia, according to the US Energy Information Administration. Most of Russia's gas exports went to European countries in 2012, with just 19 per cent delivered to Turkey.
Relying so heavily on customers in Europe makes no sense strategically or commercially. Just as consumers need a diverse source of suppliers, producers need the security that comes from having multiple customers.
Russia continues to export almost all of its oil and gas from east to west through pipelines built in the 1960s and 1970s at the height of the cold war, even though the predominant flow of energy in the world economy is now from west to east as a result of Asian industrialisation and the shale revolution in North America.
Given Russia's strategic location between Europe and Asia, the two major energy-importing regions in the 21st century, there is a strong strategic case for it to develop a more balanced approach, increasing the proportion of oil and gas that it exports to fast-growing markets in Asia.
Building new pipelines or gas liquefaction facilities to take Russian gas east to China will be enormously expensive. By contrast, the costs of building pipelines to Europe has already been sunk and long paid back.
But Russia cannot afford not to develop alternatives. Continuing to rely exclusively on pipelines to Europe exposes its gas and oil suppliers to the risk their revenues will be squeezed over the medium term.
China too has reasons to increase energy imports from Russia, especially gas. At the moment, China's economy relies heavily on domestic coal and imported oil.
But coal-fired power generation is causing severe pollution and boosting greenhouse emissions, while almost all oil imports transit through the Strait of Malacca and across the South and East China seas. China's navy cannot guarantee to keep the sea lanes open in the event of conflict with the US and its allies.
Bringing oil and gas via pipelines from Russia would strengthen China's energy security. It would cut the amount of oil and gas that must arrive along vulnerable transit routes. It would also give China more leverage to strike favourable deals in negotiations with other gas suppliers such as Australia and oil exporters in the Persian Gulf.
So far, China and Russia have struggled to reach agreement on the most important aspect of the negotiations: price. The two countries have been struggling to reach a deal over gas exports for more than 10 years.
But recent events have probably softened up both sides to make a deal. Russia badly needs to demonstrate it has other export options as European ministers contemplate cutting gas imports. China needs to develop new allies as its relations with US allies in Asia worsen rapidly.
Closer relations between President Xi Jinping and Putin, as well as the broader strategic context, suggest the time is ripe to do a gas deal.