North Korea’s launch of a satellite via ballistic missile on Feb. 7 was directed against the U.S. and regional allies like Japan, but the real target may have been North Korea’s only friend, China. Beijing had earlier dispatched a veteran diplomat to persuade Pyongyang to postpone the launch, yet North Korea instead brought it forward by a day to coincide with the eve of Lunar New Year–the country’s major holiday. This was “a slap in the face for Beijing,” says Steven Weber, an international-relations specialist at the University of California, Berkeley.
Chinese President Xi Jinping is unaccustomed to slaps. Since taking China’s top job in 2013, he has launched an unprecedented anticorruption drive within the Communist Party and riled Asian neighbors by embarking on military expansions. He is arguably the most powerful Chinese leader since Mao Zedong.
So why does Xi put up with Kim Jong Un’s defiance–much less fund it? China is impoverished North Korea’s top trading partner and its principal source of cash, food, arms and energy. If China turned its back on North Korea, the Kim regime would almost certainly collapse.
Yet China is still an essentially autocratic, one-party state–even more so under Xi–and extremely wary of having a unified, democratic, U.S.-allied Korea next door. The collapse of North Korea would send millions of refugees over the 880-mile (1,415-km) border into China, bringing with them social and economic anguish. “The North Korean regime is fully aware that it has the Chinese leadership over a barrel,” says Weber.
The launch has prompted Washington and Seoul to announce talks to deploy a new missile-defense system in South Korea–a move China has opposed, and another North Korea headache for Beijing. Ordinary Chinese are also becoming exasperated by their government’s support of the Kim regime, expressing their distaste in hastily censored social-media posts.
There’s clearly little love lost between these once close allies. “North Koreans hate China more than the U.S.,” says Daniel Pinkston, an international-relations expert at Troy University in Seoul. North Korea’s nuclear program “is as much aimed at Beijing as it is at Washington,” he adds, “because the Chinese don’t respect the North Koreans and treat them with contempt.”
This appears in the February 22, 2016 issue of TIME.