They have met more than a dozen times and stood shoulder to shoulder during Thursday's military parade here. But the once-vaunted relationship between the Chinese president, Xi Jinping, and Russia's leader, Vladimir V. Putin, has come under strain as the economies of their countries have faltered.
Two landmark energy deals signed last year for Russian natural gas to flow to China have made little progress and were barely mentioned when the two men met for talks after watching the show of weapons Thursday on Tiananmen Square. The bilateral trade that was predicted to amount to more than $100 billion this year instead reached only about $30 billion in the first six months, largely because of a reduced Chinese demand for Russian oil.
Mr. Putin has enjoyed basking in the stature of Mr. Xi, who leads one of the world's largest economies. But with the recent stock market turmoil in China and the slowest economic growth in a quarter-century, Beijing will be unable to provide the ballast that Mr. Putin has sought against economic sanctions imposed on Russia by Europe and the United States after its annexation of Crimea, not to mention plummeting oil prices worldwide.
"Russia was dependent on China growing and driving the demand for its commodities: oil, gas and minerals," said Fiona Hill, a Russia specialist at the Brookings Institution in Washington. "China was an alternative to Europe."
The linchpin of the relationship between Mr. Xi and Mr. Putin was a May 2014 accord on a 30-year deal for China to buy natural gas from fields in Eastern Siberia, for a reported $400 billion, with first delivery between 2019 and 2021. During the signing in Shanghai, Mr. Putin bragged that the deal was an "epochal event" and expressed relief that Russia, under pressure from European sanctions, would be able to diversify its gas sales.
But the price was never formally announced, and it is possible that with plunging energy prices, the deal will have to be renegotiated, said Jonathan Stern, chairman of the natural gas research program at the Oxford Institute for Energy Studies in Britain. The Chinese wanted the gas for its depressed northeast region, and the Russians had started to prepare for its delivery, but there has been only limited drilling, he said.
Another deal, for natural gas from Western Siberia, was initialed by the two leaders in November in Beijing, but a formal contract that was expected to be signed in Beijing during Mr. Putin's current visit appears to have fallen by the wayside, Professor Stern said. "This is the contract which Putin could have signed this week, but we understand will not, partly because Chinese gas demand now looks much lower than previously thought," he said.
Further complicating that deal is Russia's inability to pay for the pipelines, and the question of whether China needs the Russian gas badly enough to finance their construction, said Edward C. Chow, senior fellow at the Center for Strategic and International Studies in Washington. "China will have to pay for the construction, one way or another, given Russia's financial crunch," he said.
More from the New York Times:
Military parade in China gives Xi Jinping a platform to show grip on power
The China Factor: China falters, and the global economy is forced to adapt
Diplomatic memo: As Russia remembers war in Europe, guest of honor is from China
A Chinese expert on Russia, who is usually sanguine about the relationship with Moscow, said that the deal had also run into pricing problems. "The negotiations face many difficulties due to the plunge in the price of gas," said Zhao Huasheng, director of the Center for Russia and Central Asia Studies at Fudan University in Shanghai. "We have to recalculate all the costs and try to push for a price cut."
In Moscow, similarly, optimism about China substantially helping Russia out of its economic problems has faded.
"The big hope that China is going to provide a lifeline to sustain Russia through the sanctions and the falling oil price is not working," said Alexander Gabuev, an analyst of Russian-Chinese relations at the Carnegie Moscow Center.
"It is a symbolic relationship — with a small, volatile economic base," he said. The Kremlin elite was "disappointed that nothing has materialized as quickly as the Russians hoped."
Russian demand for Chinese manufactured goods is down 40 percent, and for clothing 50 percent, from this time last year, Mr. Gabuev said. The volatile ruble has made Chinese investors wary, and attempts to get the countries' banking sectors to work together have not borne much fruit, he added.
Because the goal of $100 billion in trade with China looks impossible to reach in 2015, the $200 billion the countries had projected by 2020 might also prove overly optimistic, Russian officials say.
The big energy deals are not the only victim of the economic slowdowns.
A fast rail link that China had said it would build to Beijing from Moscow is in doubt because China, which is an expert at such construction, is demanding that Russia pay for it. The nearly 500-mile first leg, between Moscow and Kazan, was scheduled to open before the 2018 World Cup in Russia. But work has yet to start, and it is unlikely to, Ms. Hill said. "The Russians won't have the money to pay for it, and the Chinese are not going to do it for free," she said.
The friendship between Mr. Putin and Mr. Xi has been striking and captured the attention of both countries, because each man likes to project an image of power and even daring. At global gatherings, they almost strut on the stage together. At a meeting of Asian leaders on the Indonesian island of Bali in 2013, Mr. Xi presented Mr. Putin with a birthday cake. In Beijing in November, Mr. Putin demonstrated for Mr. Xi the finer points of a Russian cellphone.
Their apparent mutual admiration has been all the more noticeable because of the long and rocky relationship during the Cold War between Communist China and the Soviet Union, when the countries were ostensibly on the same side but nearly came to a nuclear showdown in 1969 over a border war. The tenure of Mikhail S. Gorbachev at the helm of the Soviet Union sent shudders through the Chinese Communist Party, and still does.
"There has never been a close relationship until recently," Ms. Hill said. "The success of China has bred the interest of Russia." Even though Chinese growth was slowing, China still seemed "brighter" to the Russians relative to the downswings in Europe and Ukraine and to their own economic problems, she said.
The sanctions on Russia after its annexation of Crimea and its support for separatists in Ukraine also pushed the two countries closer.
Both leaders boast that they have elevated the ties between their countries to a strategic relationship; Russia and China recently held joint naval exercises in the Mediterranean and the Sea of Japan. And they have joined at the United Nations in opposing American initiatives in Libya and Syria, and have held similar views on Iran.
But there are limits to their strategic interests. China has been wary of Russia's moves in Crimea and particularly in Ukraine, where Beijing has commercial and military investments. It also worries that Crimea's secession from Ukraine might set a precedent for Chinese territories such as Tibet or Xinjiang or for the world to recognize Taiwan's de facto independence.
In Central Asia, they are more competitors than cooperative friends, especially as China buys energy from countries that have been in Russia's traditional sphere of influence, energy that China could, if it wanted, purchase from Russia.
The Obama administration has responded to the friendship with a certain nonchalance, arguing that Russia will inevitably be a liability to China, particularly in hard economic times.
In the words of Douglas H. Paal, vice president for studies at the Carnegie Endowment for International Peace, "Washington seems to think Putin is more burden than boon to Beijing."