The test, held during a major Chinese holiday, is seen as a slap in the face to Beijing. But experts say China has more to lose by downgrading its bumpy ties.

In Tokyo, a news report on North Korea's third nuclear test draws an… (Kyodo News )

BEIJING — When it comes to China's bumpy relationship with its willful ally North Korea, the main question is who needs it more.

After North Korea's third nuclear test, on Tuesday, former U.S. officials said it could take days or weeks to determine whether the country had been able to detonate a uranium-based device for the first time or miniaturize it, important progress toward building a usable weapon.

The Obama administration made it clear that it is depending on China to make the government in Pyongyang pay for its defiance, and there are reasons to believe that North Korea's main ally and economic benefactor might have had enough.

Chinese criticism of North Korea has gotten harsher. Conducting a nuclear test during China's Lunar New Year celebrations comes across as a slap in the face here. And China may conclude that taking a harder line with North Korea could help it gain international support in its own territorial disputes with Japan and other neighbors.

But experts say North Korea's location and extreme poverty suggest that China has more to lose by downgrading the alliance.

The country of 24 million serves as a buffer between China and South Korea, where American troops are stationed. A regime collapse in Pyongyang could create a powerful, unified Korea on China's doorstep. And it could send millions of refugees streaming to the Chinese border, sinking a nearly $6-billion trade relationship.

North Korea's leaders are betting that China needs them more than they need the Chinese, said Scott Snyder, a senior fellow for Korean studies at the Council on Foreign Relations in Washington.

"They hold their nose and continue to support North Korea from a strategic position despite eroding public and elite support for that approach," Snyder said.

Gi-Wook Shin, a Korean studies expert at Stanford University, said China tried to persuade North Korea not to conduct the test.

"Not only did they do it, but they did it during the biggest Chinese holiday of the year. It shows that that North Korea does what it wants to do on its own schedule," Shin said.

Despite its continued support, Beijing has signaled growing frustration as North Korea first conducted a pair of rocket launches and now a nuclear test under its new leader, Kim Jong Un. China agreed to wider United Nations sanctions after North Korea launched a rocket in December.

Chinese state media have called on the leadership to reexamine its relationship with Pyongyang. Meanwhile, the country's frenetic microbloggers are openly questioning the point of having such a troublesome friend.

Yu Jianrong, a closely followed sociologist, said the North Korean test reflected badly on China. "If a nation has always followed a foreign policy that doesn't respect justice, others will dare to dump a stink bomb right at your door while you're trying to enjoy your holidays," he said.

China's Foreign Ministry was more reserved, saying it "resolutely opposed" the latest nuclear test. It urged calm and said countries in the region should return to talks and prevent nuclear proliferation.

Tuesday's nuclear test also represents a major foreign policy hurdle for Xi Jinping, who took over as Chinese Communist Party leader in the fall and will become president next month. Xi has yet to express any new approach to North Korea.

"This is a critical test for the new Chinese leadership," said a senior Obama administration official, who spoke on condition of anonymity because of the sensitivity of the subject. "China has a unique amount of potential leverage with North Korea, given their relationship."

The U.N. Security Council met Tuesday in response to the nuclear test, and the United States called for tighter sanctions on North Korea. Susan Rice, the U.S. ambassador to the United Nations, and other U.S. officials suggested that they were considering sanctions similar to those aimed at cutting off Iran's foreign trade. Rice said U.S. officials believe that financial sanctions, including those aimed at banks, a 9re "areas that we think are ripe for appropriate action."

South Korean defense officials estimated the size of Tuesday's blast at 6 to 7 kilotons, more than their 4-kiloton estimate for North Korea's last test, in 2009.

North Korea's two previous nuclear tests used plutonium. Two years ago, it showed off a plant capable of producing highly enriched uranium for several bombs a year, but U.S. officials don't believe the plant is operational.

If the bomb was uranium-based, it would suggest that North Korea has a secret uranium enrichment center elsewhere.

"If it's uranium, that becomes a much more dangerous security situation because it would mean more nuclear warheads for North Korea," said Sue Mi Terry, a former top CIA analyst on North Korea who is now at Columbia University. "It's also harder to detect."

Analysts said North Korea still probably faces major hurdles in making a device small enough to be used as a weapon.