North Korea's reported nuclear test and the ensuing diplomatic fallout come as China calibrates its role as a rising global power. How a newly emboldened China decides to handle its erratic ally – after what has widely been seen as a slap in the face for Beijing's negotiating track – could also shape China's foreign policy on other fronts, analysts say.
China strongly condemned Monday's test, which may have upended its status as the only confirmed nuclear power in East Asia. Foreign Ministry Spokesman Liu Jianchao said Tuesday that North Korea's test had damaged bilateral relations, and that China wanted to see "appropriate action" from the United Nations Security Council.
But behind China's stern rebuke is a reluctance to use multilateral sanctions or military force to bring Kim Jong Il's regime to heel – tactics that Beijing would see as unwelcome precedents with potentially destabilizing effects on the region.
Instead, China has historically put its stock in dialogue and negotiations with North Korea while propping up its neighbor with fuel and food. The apparent failure of that policy to keep the Korean peninsula nuclear-free, and to avert an international crisis, is a setback that will weigh heavily on the shoulders of China's leadership, say analysts.
"What the test has shown is that the road to Pyongyang doesn't necessarily run through Beijing. There's got to be another path," says Russell Moses, a Beijing-based political analyst.
"So there's a conflict in the [Chinese] leadership: Do we find some way to show we're a major power, or wash our hands of it and hand it over to the US?" Mr. Moses says.
Chinese diplomacy puts economic cooperation and political stability on a pedestal that leaves little room for the niceties of democracy and human rights – such as in its dealings with Sudan or Zimbabwe. At the same time, China is increasingly aware of its international image and the prestige and power of joining its peers.
As the convener of the six-party talks that brought together North Korea, Japan, the US, Russia, and South Korea, China grasped an opportunity to play mediator and promote peaceful negotiations. By testing a bomb, North Korea has scuttled the talks and prompted the UN Security Council to consider much tougher action than was imaginable a week ago.
Now the question for China is whether it can stay on the sidelines of UN actions and still claim to be engaged in finding a solution to the North Korean crisis. Analysts say Beijing may go along with demands for limited sanctions, while arguing that it's counterproductive to isolate the regime further.
China may also impose bilateral sanctions on North Korea in order to bring it back to the negotiating table.
Some analysts argue that China could emerge as a powerbroker between the US and North Korea, even if Beijing doesn't see eye to eye with the Bush administration.
"China should play a bigger role in Northeast Asia as a coordinator," says Huang Dahui, associate professor of international studies at People's University in Beijing. "This would show that China is a responsible power. The US may come to rely even more on China."
But elevating its diplomatic profile would require Beijing to stop coddling North Korea, its former comrade-at-arms. North Korea relies on its giant neighbor for economic support, and its latest defiance may be reason enough to rethink the relationship, says Niu Jun, a historian of the Chinese Communist Party at Peking University.
"The old policy is too rigid and China has an opportunity to shift its foreign policy. Even before the nuclear test, China had realized that something is wrong with this relationship," says Mr. Niu. But, he adds, "Chinese leaders don't have a clear idea on how to deal with North Korea."
Such a policy shift would bring China closer in line with Japan. A successful summit last weekend between President Hu Jintao and newly appointed Prime Minister Shinzo Abe had already signaled a partial détente between the two nations.
South Korea is grappling with its own dilemma on whether to punish the North or continue its own "Sunshine Policy" of economic engagement.
The North Korean nuclear crisis comes during China's annual Communist Party policy meeting, where political heavyweights are jostling for influence after a recent purge of Shanghai's top leadership.
While analysts differ on how much leverage China has over North Korea – which is driven as much by internal politics as rational self-interest – China has taken harsh measures previously against its neighbor, such as halting energy supplies in order to jolt Pyongyang into action.
China has also sought to persuade Mr. Kim to adopt the market reforms that have wedded Beijing's brand of authoritarian rule to a sustained economic boom.
Yet even tough action by Beijing may not tame a regime that cherishes self-reliance above all, says Peter Beck, director of International Crisis Group's office in South Korea.
"Pyongyang took the calculated gamble that it would not be forsaken by Beijing or Seoul," Mr. Beck says. "But they also made the calculation that even if they are, they can stick it out."