Relations between Moscow and Beijing have grown steadily closer since the early 1990s, when the fall of the Soviet Union brought an end to the decades of enmity that were largely based on ideological differences between the two Communist states.

As permanent members of the United Nations Security Council, the two countries have come to rely on each other to veto measures condemning dictators in Zimbabwe, Myanmar and Syria. And just last month, after President Obama and several European leaders snubbed Mr. Putin by skipping the Winter Olympics in Sochi, the Russians took comfort in the sight of President Xi Jinping of China cheering from the stands.

Yet while it may preserve the strategic relationship with Moscow, China’s support for Russian aggression in the Crimea comes with its own set of challenges and perils. Beyond rendering hollow its nonintervention credo, the coming plebiscite makes Chinese leaders especially uneasy, given the aspirations of millions of Tibetans, Mongolians and Uighurs who would jump at the opportunity to vote themselves out of the current arrangement with Beijing.

Those fears were highlighted this month when a group of attackers from far west Xinjiang, a region with a large population of Turkic-speaking Muslims, slashed to death 29 people at a train station in southwest China.

Then there is Taiwan, the self-governed island off the coast of eastern China that Beijing hopes to one day reunite with the mainland despite the objections of most residents, who prefer the status quo.

Russia’s Western rivals, having absorbed lectures about Western arrogance and self-righteousness, have not been shy about highlighting China’s difficulties. “China was one of the countries that underlined the importance it attached to the unity and territorial integrity of Ukraine,” Mark Lyall-Grant, the British ambassador, said in response to a question about China’s stance.

Last week, the United States ambassador to the United Nations, Samantha Power, indirectly referred to China’s position, too. “Russia finds itself extremely isolated,” she said after Thursday’s Council meeting. She did not have to name China. It was implied, since on virtually every other major issue the Council has faced in recent months, China and Russia have stood shoulder to shoulder.