Foremost is the United States’ request that China slash its purchases of Iranian oil or, under legislation just signed by President Obama, potentially face the exclusion of many of its financial institutions from the American financial system. Although the White House has wide leeway in choosing targets for enforcement, the law is by far the toughest measure aimed at pressuring Iran over its nuclear program in recent times.

The willingness of the European Union and others to consider aggressively cutting oil purchases puts the Chinese in the awkward position of bucking most of the West’s largest economies — to preserve its ties to Iran. And the history of the last year — in which seemingly secure Arab allies like Col. Muammar el-Qaddafi of Libya, another important supplier of oil, were swept out of power — throws a new element of uncertainty into China’s commitment.

Chinese leaders who pored over the Soviet Union’s demise for clues to preserving their own hold on power are unlikely to ignore the lessons of the Arab Spring. The Chinese government may also be more cautious about the side it chooses, considering the embarrassment caused when the biggest state-owned arms company was found to have offered to sell weapons to Colonel Qaddafi to put down the uprising.

“Their political influence has gone down a lot in the last year. Libya, Yemen, Syria — those are all states which had either good or very good relations with China,” said François Godement, a senior fellow at the European Council on Foreign Relations in Paris. “In that mood, it’s quite possible that the Chinese would decide to hedge.”

Joseph S. Nye Jr., a Harvard professor who held security and intelligence posts in the Carter and Clinton administrations, said he agreed. “The more this Iranian crutch looks weak, or weakening, the less they’re going to stick with it.”