China rebuked President Trump on Wednesday after he threatened to "totally destroy" North Korea if necessary, a warning that may have undermined the chances­ of peace but also gave Beijing an easy opportunity to seize the moral high ground.

Beijing has consistently blamed not just Pyongyang but also Washington for what it sees as its hostile policies toward the regime. It argues that U.S. hostility has helped to push North Korea’s rulers into a corner and talk of total destruction only reinforces that narrative.

"Trump threatens DPRK with 'total destruction,' while China calls for peaceful settlement," the online English-language edition of the People's Daily newspaper headlined an op-ed, referring to the county's official name, the Democratic People's Republic of Korea.

“Trump’s political chest-thumping is unhelpful, and it will only push the DPRK to pursue even riskier policies, because the survival of the regime is at stake,” the op-ed said.

China’s Foreign Ministry spokesman, Lu Kang, was more restrained, but nevertheless conveyed a similar message.

Chinese artist Zeng Anting displays portraits of President Trump and North Korean leader Kim Jong Un at a market in Beijing on Sept. 19. (Greg Baker/AFP/Getty Images)

In imposing economic sanctions on Pyongyang, the U.N. Security Council has agreed that the North Korea issue should be solved through “political and diplomatic means,” he said.

“The Peninsula situation is still in a complex and sensitive state,” he said. “We hope that relevant parties could maintain restraint while completing United Nations Security Council resolutions, and take more correct actions which are helpful in easing the situation.”

More than 80 percent of North Korea's foreign trade is with China, while both Beijing and Moscow have been blamed for helping North Korea develop its missile program. Although Trump thanked China and Russia for agreeing to sanctions at the United Nations, he also appeared to rebuke one or both of them.

“It is an outrage that some nations would not only trade with such a regime, but would arm, supply and financially support a country that imperils the world with nuclear conflict,” he said.

But China is uncomfortable with the idea that it should shoulder most of the blame for North Korea’s nuclear and missile program, and for Pyongyang’s refusal to back down, experts say.

“They don’t like the idea that the international community sees this as a China problem,” said Paul Haenle, director of the Carnegie-Tsinghua Center in Beijing. “To a certain extent, this kind of talk at the U.N. plays right into their hands.”

Yanmei Xie, a China policy analyst at Gavekal Dragonomics in Beijing, made a similar point.

“Trump's bellicose rhetoric does add urgency to how China views this issue,” she said. “But it also reinforces China’s view that both sides are to blame for the tension.”

China has become extremely frustrated with Pyongyang but does not believe that sanctions will ever force it to abandon its nuclear program, which the regime sees as central to its survival.

China has resisted pressure to cut off North Korea’s oil imports, which it believes would only serve to alienate the regime from Beijing and leave China facing a nuclear-armed enemy state on its border.

“They believe that there is nothing we can do at this point to prevent Kim Jong Un from reaching his goal” of developing an intercontinental nuclear missile capability, Haenle said. “And they don’t want to cross the threshold where they become North Korea’s enemy.”

So while Trump has persuaded China to turn the screw on North Korea, he will struggle to convince it to act more forcefully.

François Godement, director of the Asia/China Program at the European Council on Foreign Relations, said Trump may suffer a “credibility” problem in Chinese eyes by also threatening the governments of Iran, Venezuela and Cuba, rather than showing a resolute focus on a single issue.

But do Trump’s words presage armed conflict?

The nationalist Global Times newspaper took a pessimistic view, arguing in an editorial that Trump's speech had "reduced hope of peace" on the Korean Peninsula.

“Facts prove Pyongyang won’t yield to pressure. Pushing North Korea to its limit may eventually trigger a bloody war,” it warned. “If a nuclear war broke out, that would be a crime against Chinese and South Koreans by Pyongyang and Washington.”

However, several other experts said they were not worried.

“China and Russia have a common stance on this — they want to prevent war even if there is only a 1 percent chance of it,” said Wang Sheng, a North Korea expert at Jilin University in Changshun. As a result of their joint resolve, he said, “the United States could not easily start a war.”

Military expert Song Xiaojun agreed.

“What he said is a tactic, it doesn’t mean he will really start a war,” he said. “The U.S. Army is concerned about other things, such as China’s rise and Iran. Since the atomic bomb was developed, the United States has never started a war with a nuclear-armed country.”

Last month, the Global Times newspaper warned North Korea that China would not come to the country's aid if it launches missiles threatening U.S. soil, although it would intervene if Washington strikes first.

That statement was meant to deter Pyongyang from crossing any red lines, experts say.

In the event of war, it is unlikely Chinese troops would fight alongside or on behalf of North Korean soldiers to defend the regime, as they did in the 1950-1953 Korean War, but they could enter the country to secure nuclear weapons sites and prevent U.S. troops from crossing into the North and installing a U.S.-friendly puppet government, some experts say.

In Pyongyang, the government will also have taken very clear note of Trump's angry disavowal of the nuclear deal with Iran, where that country agreed to abandon its nuclear weapons program under international supervision in return for a lifting of sanctions.

Trump called that deal "an embarrassment to the United States" and threatened to pull out of it. Saying "oppressive regimes cannot endure forever," he also called for the Iranian people to change their own government.

North Korea's leader, Kim Jong Un, has already seen Libyan leader Muammar Gaddafi and Iraq's Saddam Hussein agree to surrender their efforts to develop weapons of mass destruction only to end up ousted from power and killed. Trump's talk will only reinforce that lesson.

"How can Kim not conclude from this that Americans will not rest until his regime is toppled and that giving up nuclear weapons is suicidal?" asked Xie at Dragonomics.

Liu Yang, Luna Lin and Shirley Feng contributed to this report.

Read more