An undated image distributed September 3 by the North Korean government purporting to show North Korean leader Kim Jong Un inspecting the loading of a hydrogen bomb into an ICBM at an undisclosed location. Photo: 朝鮮通信社/Korean Central News Agency/Korea News Service via AP

North Korea’s latest nuclear test has ruined Sundays in at least four countries. It may mark an opportunity to bring China closer to the U.S. and intensify a global effort to get Pyongyang’s nuclear posturing under control, but that will take deft diplomacy — and the U.S. has been letting off some worrying explosions of its own.

Hydrogen bombs are more technologically difficult to develop, but they yield far more destructive force for their size — meaning they are easier to make small enough to fit on a missile that can fly across the Pacific Ocean. Before this weekend’s test, North Korean leader Kim Jong Un was photographed with what he said was a device that could fit on an intercontinental ballistic missile.

The message to the U.S. and its allies seems clear: Yes, I can.

But the timing of this test sends other messages, too. It comes just on the heels of North Korea’s decision to fly a missile over Japanese territory — a risky and unnerving situation for Japanese citizens — thus upping the pressure on the government in Tokyo for an aggressive response.

For China, North Korea’s regional protector and ultimately the only power which might have decisive economic influence over the isolated state, this test is an embarrassment. Enormous nuclear explosions — and the disconcerting earthquake that followed the underground test — are not the kind of thing you want in your neighborhood.

What’s worse, China’s leadership hosts the country’s party congress this week — a combination of a political-party convention and presidential inauguration in a country that has only one party and no contested national elections. It is the central event in the nation’s political life, and this one was intended to showcase Chinese leader Xi Jinping as he is reelected to lead the party and country for a second five-year term. Part of Xi’s case to his nation is that, under his leadership, China is marching steadily toward “moderate prosperity” at home (the kind of political slogan you can get away with if some of your citizens still remember nationwide famine and starvation), dominance in the region, and respect globally. The pressures of slowing growth and social challenges at home are real, and Xi wants to present himself as strong abroad. He has been helped enormously by China’s ability to say that it is replacing the U.S. in areas from global response and climate change to economic leadership in Asia. How embarrassing, then, to have tiny, weak North Korea challenging Xi and Trump in the same stroke.

Some China experts are hopeful that this will lead Beijing to put more pressure on the North — to slow its unsettling pace of tests or negotiate over its program. But others are skeptical because, embarrassing as this may be, it doesn’t change Beijing’s fundamental calculations. Seen from China, while Kim Jong Un is an awkward, angst-provoking, and expensive ally (as Beijing must provide assistance and care for the thousands of refugees and migrants who do make it across the border), he is infinitely better than a reunification of North and South Korea, which might bring U.S. forces all the way to China’s border — or lead to a collapse propelling the number of North Koreans coming across to China into the millions.

Building a closer, more effective partnership between Beijing and Washington would demand two things from the United States. First, diplomacy that avoids needlessly embarrassing or angering Beijing and other regional players. And second, a willingness to yield on some of the regional partner’s most important priorities. In other words, basic negotiation and team-building skills.

However, the Trump administration’s actions toward the single most important actor among U.S. allies — South Korea — point in exactly the opposite direction. In recent weeks, U.S. military and diplomatic leaders have been at pains to reassure the new government in Seoul that the alliance is close and that they are secure under the U.S. nuclear umbrella. The new South Korean president, by the way, hails from the left, which is historically more hostile to the U.S.: Moon Jae In is a former human-rights lawyer who spent time in jail under pro-Washington regimes. He was elected on a platform of skepticism — to put it mildly — toward Donald Trump. Managing this relationship would be tricky for any U.S. administration, but the Trump team has chosen to make it maximally difficult.

South Koreans — and the region — are well aware that Trump has questioned the value of the security alliance in the past. Although officials around Trump have worked hard to repair that damage in recent months, with visits from the vice-president and defense leaders, astonishingly, the White House has decided to reopen the wound. Trump chose the same period of ferment over the North’s nuclear progression to demand that Seoul renegotiate the U.S.-Korea Free Trade Agreement. The South Korean president may have little fondness for his predecessor, who negotiated the treaty, but Moon Jae In also seems to have judged reopening it as not in his interests. Just this past weekend — even as U.S. intelligence knew that a nuclear test was likely imminent and had surely informed the White House — Trump threatened to unilaterally dump the U.S.-Korea trade treaty. This option would be so disruptive to commerce and employment that even Americans who had opposed the treaty spoke out against it. It would also be an enormous humiliation to the president of South Korea — and a terrible advertisement to Pyongyang, Beijing, and elsewhere about the value of a U.S. commitment.

This nuclear test is unnerving. It underlines that Washington and the region can’t ignore North Korea, can’t get distracted — and must put existential questions ahead of political ones. Unfortunately, the biggest question mark surrounds neither Beijing, Tokyo, nor Seoul, but Washington.