China’s Foreign Ministry has been at its stonewalling, noncommittal best this week after news of the dramatic assassination of Kim Jong Nam, the half brother of North Korea’s leader, repeating the mantra that it has “noticed relevant media reports and is closely following developments.”

But behind the scenes, there is a sense of shock and dismay in Beijing, officials and experts say: If indeed Kim Jong Nam was assassinated on the orders of the North Korean leader, it would be seen as an affront to the country that has afforded him protection for many years.

[Who was Kim Jong Nam?]

“China’s inner circle of government is highly nervous about this,” said Wang Weimin, a professor at the School of International Relations and Public Affairs at Fudan University in Shanghai.

“Kim Jong Nam’s assassination makes China more aware of how unpredictable and cruel the current North Korean regime is, as well as Kim Jong Un’s willingness to abandon China and sell it for his own benefit at any second,” Wang said.

North Korean leader Kim Jong Un pictured on a South Korean news show about the assassination of his half brother. If North Korea was involved, it would be embarassing for China. (Jeon Heon-Kyun/EPA)

Kim Jong Nam had lived for over a decade in Beijing and Macau, apparently with wives and children in both places, and had a reputation as something of a playboy who liked to visit casinos. Chinese experts said he had received 24-hour protection — and monitoring — from China’s security services, as well as financial assistance when he needed it.

Yet despite his status as the eldest son of former leader Kim Jong Il, he had shown no obvious political ambitions. Wang said that Chinese authorities realized long ago that he lacked leadership potential, and that they did not pin huge hopes on him. Nevertheless, he was a guest of their country, and one who would probably have provided valuable intelligence in the past.

The assassination has come at an uncomfortable time for Beijing, just days after North Korea conducted a missile test and when the new Trump administration has been asking China to do more to rein in its troublesome neighbor and ally.

[North Korea fires ballistic missile, first since Trump elected in U.S.]

China responded to that missile test by asking the United States not to escalate the situation but instead to start a dialogue with Pyongyang.

Then, on Monday, Kim Jong Nam apparently was poisoned in an attack by two women at Kuala Lumpur International Airport in Malaysia. It was a reminder, according to Marcus Noland and Stephan Haggard at the Peterson Institute for International Economics, of the North Korean regime’s true nature: “a cruel and ultimately capricious dictatorship that cannot be trusted on anything,” the two wrote in a recent essay.

While China’s official Communist Party mouthpieces, the People’s Daily newspaper and Xinhua News Agency, have confined themselves to bland news reports on the incident, the nationalist Global Times tabloid, given a freer rein, has been more forthright, reflecting views shared by some officials and ordinary citizens.

Speculation points sharply at Pyongyang’s hand in the murder, in-house commentator Shan Renping wrote Thursday. If that is confirmed, Shan noted, China would join the international community in condemning it.

“Regardless of how intense a country’s political struggle might be, there is no doubt that it should never rely on assassination methods as means for its advancement,” he wrote. “Human civilization is now in the 21st century, and such a savage and outdated political device should be cast into the museums of history.”

China’s critics, however, accuse the country of reaching across borders to kidnap its own dissidents.

Relations between Beijing and Pyongyang have deteriorated significantly in recent years. Chinese President Xi Jinping and Kim Jong Un have never met and are believed to share mutual disdain, experts say.

[Kim Jong Un is a top suspect in his half brother’s death. But questions abound.]

In a sign that China’s patience might be running out, it rejected a shipment of coal from North Korea on Monday, a day after the ballistic missile test, South Korea’s Yonhap News Agency reported.

Fudan University’s Wang said China recently received intelligence indicating that some people in North Korean leadership circles have been suggesting sacrificing ties with China and trying to establish closer links with the United States, Japan and South Korea.

“The idea that China cannot be trusted and can only be used, that Japan has been the deadly enemy for hundreds of years but China has been the old enemy for thousands of years — that mentality still prevails in their internal party meetings and was inherited from Kim Jong Un’s grandfather,” he said.

In that context, the assassination of Kim Jong Nam could be a signal of the regime’s unhappiness with Beijing for supporting United Nations sanctions and of a desire to distance itself from China, he said.

Other experts say that it is more likely that Kim Jong Nam was killed by the Southeast Asian underworld, or that — if Pyongyang was responsible — it had more to do with the regime’s internal dynamics and paranoia than a desire to send a signal to the world.

Nevertheless, as commentator Ding Gang wrote in the Global Times, the development has not made the task of reining in North Korea’s nuclear program any easier — and that is not good news for China.

“North Korea’s nuclear facilities and missile bases are located near China’s border,” he wrote. “Once the situation in the Korean Peninsula spirals out of control, the facilities will be primary targets or the final fortress of North Korea’s defense. Either way, the effects on China will be severe.”

The murder of Kim Jong Nam, he warned, could reinforce destabilizing calls for tougher action to force “regime change” in Pyongyang.

“People in the U.S., Japan and South Korea will more likely opt for hard-line approaches, which will trigger nuclear security problems,” he wrote. “We had better prepare for a nuclear emergency in North Korea rather than wasting our time discussing who is behind the assassination.”

Congcong Zhang and Jin Xin contributed to this report.

Read more:

North Korea must supply DNA to retrieve body of leader’s half brother

A not-that-short history of North Korean assassinations and attempts

‘Who did it?’ 5 questions people are asking about the death of Kim Jong Nam.

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news