North Korea has often blamed the "hostile policy" of the United States for its development of nuclear weapons.
When the communist country announced a purported test of a hydrogen bomb Wednesday, it said the test was a "measure of defense" against the U.S.
Analysts, however, say the test might be a show of Pyongyang's dissatisfaction with Beijing, a reflection of deteriorating ties between the two allies.
In a rare move, China's Ministry of Foreign Affairs publicly criticized the North Korean action, saying Beijing "firmly opposes" Pyongyang's suspected nuclear test. Spokeswoman Hua Chunying told reporters her country had not been given warning of the test.
Bilateral ties between the neighboring countries have cooled since late 2011, when Kim Jong Un took power. Relations deteriorated further in 2013, when Pyongyang proceeded with its third nuclear test despite Beijing's repeated warnings.
FILE - The TV news shows footage of North Korea's nuclear test on Feb. 12, 2013.
Analysts say the latest test has angered Chinese leaders and could lead to Beijing's participation in international efforts to impose fresh sanctions on Pyongyang. Beijing's participation is viewed as a key component of international sanctions on Pyongyang.
Richard Bush, a senior fellow at the Brookings Institution in Washington, said Beijing might take a tougher stance on Pyongyang this time.
"My guess is that China will intensify its support for what the international community has already done," Bush said.
He said there is still room for additional financial sanctions on Pyongyang, adding that Beijing "could do more" in tightening the penalties.
Douglas Paal, vice president for studies at the Carnegie Endowment for International Peace in Washington, said the test came as Beijing was trying to mend ties with Pyongyang and the Chinese would take the North Korean action as counterproductive.
"Judging from what I have heard from the Chinese over the last few months, this would be surprising and irritating to them," Paal said.
He also said Beijing could take stronger actions to send a message to Pyongyang.
The test site was close to the Chinese border and the Chinese must have realized the potential danger, said Bruce Bennett, a senior defense analyst at the RAND Corporation.
"If North Korea really were to explode an H-bomb at the Punggye-ri nuclear facility, that is so close to the Chinese border that it would cause serious damages more than likely in China," Bennett said.
Robert Manning, a senior fellow at the Atlantic Council, said he expects that Beijing's actions would be limited, despite the current troubled relationship between Beijing and Pyongyang. China appears to be afraid of the destabilization of the North Korean regime, which could slide into chaos on the Chinese border.
"They are trying to find a path that sends a message to North Korea, but doesn't push them to the point where they have to worry about a collapse of their regime," Manning said.
Manning added that over the past few years, the Chinese appeared to be leaning toward a sense that their ally is more of a liability than an asset.
Gordon Chang, an author and columnist who writes extensively on China, said there appears to be little consensus in the Chinese leadership about whether it should change its policy on North Korea at this point.
"In Beijing, there are a lot of people who do want to change the Chinese foreign policy with regard to North Korea to take a tougher stance against Kim Jong Un, but there is no consensus to do so," Chang said.
On Friday, Beijing rejected Washington's criticism that its policies toward Pyongyang had failed.
"The origin and crux of the nuclear issue on the Korean Peninsula has never been China," Hua said, in an apparent reference to comments by U.S. Secretary of State John Kerry.
On Thursday, Kerry told reporters that Beijing's approach to Pyongyang "has not worked, and we cannot continue business as usual."