For more than a decade, Kim Jong-nam, the exiled half brother of North Korea’s Supreme Leader Kim Jong-un, lived in Beijing and Macau under the protection of the Chinese state. But, on February 13th, he looked to be travelling alone when two dark-haired women approached him at Malaysia’s Kuala Lumpur International Airport. In what appears to be leaked CCTV footage, one of the women approaches Kim in the check-in area, while the other rushes up from behind and seems to wipe her hands across his face. After the alleged assassins stroll away in opposite directions, Kim is shown, alone, approaching airline personnel and miming the mysterious ambush. Soon after, a direct descendant of North Korea’s ruling dynasty was dead.

Kim’s assassination, which the South Korean government called a “terrorist act” carried out by the North Korean regime, shocked China’s leadership. (Malaysian police have implicated several North Koreans in the killing and want to question a diplomat at the North Korean embassy in Kuala Lumpur.) In recent months, when Kim stepped out in Macau, the semiautonomous Chinese casino town, where he spent much of his time, he could be seen without a security detail, but he was nonetheless China’s main—if politically blemished—North Korean asset. (Kim went into exile after he was stopped at the Tokyo airport, in 2001, while trying to sneak into Japan with a forged passport from the Dominican Republic. He claimed that he was trying to visit Tokyo Disneyland.) The suggestion that his younger half brother—known as “Fatty Kim the Third” in Mandarin—had ordered the assassination strained at the bonds between the People’s Republic of China and the Democratic People’s Republic of Korea, or the D.P.R.K.

This was not the first hit on a pro-China relative of the Supreme Leader. In late 2013, Kim Jong-un’s uncle Jang Song-taek, who had tried to reinvigorate the North Korean economy through market reforms advised by the Chinese, was executed. Jang’s offenses included “half-heartedly clapping” when his nephew received a military promotion. China, uniquely among the world’s powers, has continued to offer its assistance to North Korea. It’s a big-brother relationship that goes back to the first half of the twentieth century, when revolutionaries in both places were experimenting with communism; it was only because Chairman Mao Zedong dispatched more than a million Chinese troops to fight in the Korean War that Kim’s grandfather Kim Il-sung kept control of the northern half of the Korean peninsula. But the reign of Kim Jong-un has caused consternation. “Beijing’s patience is running out,” Zhu Feng, an influential foreign-policy adviser and a professor at Nanjing University, in eastern China, said. “The Kim regime has done absolutely nothing that is good for China’s national interest.”

The day before the assassination, North Korea thumbed its nose at its lone ally, firing a medium-long-range missile into the Sea of Japan, shortly before U.S. President Donald Trump sat down for dinner with Prime Minister Shinzo Abe, of Japan. China has made it clear that it doesn’t appreciate North Korea’s nuclear ambitions. Yet, since taking power, five years ago, Kim has overseen three nuclear tests, one more than his father unleashed during seventeen years in power, and, over the past two years, has launched more test missiles than at any point in North Korean history. He has made no secret of his goal of perfecting an intercontinental ballistic missile that can reach the U.S. mainland.

Trump has accused China of enabling North Korea’s unpredictable ruler. Beijing has “total control over North Korea,” the U.S. President said in an interview last month with “Fox & Friends.” “China should solve that problem. And if they don’t solve the problem we should make trade very difficult for China.” Last Friday, U.S. Secretary of State Rex Tillerson urged his Chinese counterpart, Foreign Minister Wang Yi, to “use all available tools to moderate North Korea’s destabilizing behavior,” according to a State Department readout.

China and North Korea were once so close that Mao, whose elder son died on Korean soil during the Korean War, likened the relationship to an anatomical embrace between “lips and teeth.” Kim Jong-il, the current Supreme Leader’s father, travelled to China seven times between 2000 and 2011, even when he was ailing and near death. By contrast, the younger Kim has not met China’s President Xi Jinping since taking power. “Xi Jinping does not trust Kim Jong-un at all,” Wu Qiang, a political scientist at Tsinghua University, in Beijing, told me. The aversion appears to be mutual, with Kim sharing his grandfather’s suspicion of the giant neighbor that long relegated Korea to tributary-state status. “This is about Kim establishing his power and legitimacy,” John Delury, an expert on North Korea at Yonsei University, in Seoul, said. “Kim is a young leader of a nationalist regime, and the onus is on him to avoid kissing Xi’s ring, so he can prove that he’s not a pawn of Beijing.”

China does have significant leverage over North Korea, as it remains the D.P.R.K.’s economic lifeline, piping in the oil needed to keep the workers’ paradise operational. Shutting off that spigot could be catastrophic, even for a regime that has proven more than willing to sacrifice millions of its citizens to continue the Kim dynastic rule. For China, the prospect of economic collapse in the North, and with it the fall of the Kim family, brings a potential security nightmare to its border: a unified Korea led by the South, which currently hosts tens of thousands of American soldiers.

“The Chinese are deeply frustrated and want to do something, but they get stuck when they look at the options,” said Paul Haenle, the director of the Carnegie-Tsinghua Center for Global Policy, in Beijing, and a former White House representative at the stalled six-party talks, which were aimed at curtailing North Korea’s nuclear program. “If they put economic pressure on the North and it implodes, they lose the buffer zone and refugees flood in. If they apply political pressure, then China could become the enemy,” at least in Kim Jong-un’s eyes, “and then the missiles that were directed at the U.S. and its allies are suddenly pointed at them.”

On Saturday, China announced what could be read as a rare rebuke of Kim’s excesses: Beijing was suspending all imports of North Korean coal for the rest of the year. In effect, North Korea’s total exports were being slashed by around forty per cent. Last year, even as Beijing promised to implement United Nations sanctions punishing North Korea for its nuclear program, Chinese imports of North Korean coal actually increased year-over-year, due to a loophole that allowed for trade for “livelihood” purposes. The new embargo may have been meant as a signal directed as much at Washington as at Pyongyang. “The Chinese are sick of hearing that they’re the only ones with leverage, so the effect of the coal ban is to say, “O.K., we’ve done it, now it’s your turn to deal with them,” Delury, the expert in Seoul, said. “It’s almost as if the Chinese want the Americans to own the North Korea problem.”

Ultimately, geography and ideology guarantee that North Korea is China’s problem, even if Beijing wishes it were otherwise. “There is no issue that divides China’s foreign-policy community more than the D.P.R.K.,” Zhu, of Nanjing University, said. Reprimanding a wayward little brother is one thing; abandoning him altogether is quite another. But, with every one of Kim’s provocations, Zhu and some others in the Chinese foreign-policy establishment have reached a stark conclusion—one that Beijing’s traditionalists worry demeans the memory of the hundreds of thousands of Chinese soldiers estimated to have died defending North Korea. “Regime change and unification of the Korean peninsula is inevitable,” Zhu said. “We all know it’s going to happen sooner or later. The question is: Will China choose to be on the right side of history?”