Returning from vacation, Donald Trump spent much of his first day back in the White House, January 2nd, on Twitter lambasting foreign governments. In twenty-four hours, he assailed Iran’s crackdown on street protests, denounced Pakistan, and threatened to pull aid from Palestinians for failing to show “appreciation or respect.”

But he gained the most attention around dinnertime, when he threatened a nuclear holocaust in North Korea. Responding to Kim Jong Un’s speech from a day earlier—when the North Korean leader said the U.S. is “within the range of our nuclear strike and a nuclear button is always on the desk of my office”—Trump tweeted, “Will someone from his depleted and food starved regime please inform him that I too have a Nuclear Button, but it is a much bigger & more powerful one than his, and my Button works!”

For seventy years, North Korea has baited America with threats of mayhem, and, for seventy years, American Presidents, with rare exceptions, understood that squabbling with a pariah state whose economy is smaller than that of Rhode Island would diminish their own stature and America’s standing. Trump, by contrast, summoned the world’s attention and then sawed himself off at the knees.

After a year of the President’s casual threats of mayhem, of his belittling of American alliances, of claims so bizarre that a man shouting them on a public bus would get a wide berth, the response from Americans generally ranges from disbelief to despair to numbness. They are moments that defy the usual analysis, other than psychoanalysis.

Taking a legalistic tack, some wondered if the most immediate defense against an accidental nuclear exchange might be found in Twitter’s terms of service, since users have been suspended for far less than threatening nuclear war. But when the company was asked if the President had broken the rules, a Twitter spokesperson replied, unpersuasively, that “Trump’s North Korea tweets do not amount to a ‘specific threat,’ and thus do not warrant disciplinary action,” Business Insider reported.

Nobody, including Trump’s national-security staff, assumes that there is strategy or forethought at work (“You just don’t know what’s going to send him over the edge,” an Administration insider told Axios), so, as is often the case, there was a public search for the triggering event. In this instance, the trigger appeared to be environmental: twelve minutes before Trump tweeted about his button, Fox News posted a chyron that read, “KIM JONG UN SAYS HE HAS ‘NUCLEAR BUTTON.’ ”

In the short term, Trump’s taunts will almost certainly compel North Korea to respond in words or actions. When I visited North Korea last year, officials in Pyongyang found it nearly impossible to imagine that an American President was actually improvising; they interpret Trump’s antics as chaotic but intended. At the time, the President had yet to start taunting Kim personally, and North Korean officials told me that they had specifically taken note of Trump’s willingness to mock his rivals, but not Kim. In the months that followed, that changed: Trump started calling Kim “Little Rocket Man,” mocked him as “short and fat,” and threatened to “totally destroy” his country. Even by the standards of dictatorships, Kim is acutely sensitive to his personal image, because he is young and alert to the risks of looking weak in front of older, established military and intelligence officials.

Trump’s announcement about his button also provided an unexpected boost to North Korea’s strategy against the United States. In his New Year’s Day speech, Kim sought to drive a wedge between Washington and its partners, including Beijing and Seoul. He did so by offering to hold talks with South Korea about potential North Korean participation in the upcoming Winter Olympics. As expected, Seoul accepted that offer, cheered on by Beijing, over the protests of Washington, which is seeking to isolate North Korea as much as possible. By heightening the tension at the moment that Seoul and Beijing are trying to resolve it, Trump succeeded only in isolating himself.

In the long term, Trump’s outbursts erode America’s credibility as a source of steady, wise leadership. In the magazine this week, I described how some American allies have taken to minimizing their contact with the White House, and how one of the beneficiaries of that change, China, is trying to adjust to a world in which the American President is voluntarily giving up his leverage. Yan Xuetong, the dean of Tsinghua University’s Institute of Modern International Relations, told me, “In 1991, when Bush, Sr., launched the war against Iraq, it got thirty-four countries to join the war effort. This time, if Trump launched a war against anyone, I doubt he would get support from even five countries. Even the U.S. Congress is trying to block his ability to start a nuclear war against North Korea.”

China will gain from this in ways that Americans may find difficult to see in real time. Instead of playing out in a single day on social media, the consequences will play out over decades. The U.S. and China used to joust mainly over specific issues—human rights, hacking, the South China Sea—but, today, they are engaged in a larger contest to shape the world order “by having their values and policies accepted on the global stage,” as Robert Daly, the director of the Kissinger Institute on China and the United States at the Woodrow Wilson Center, recently wrote. The contest will hinge, Daly predicted, on whether Beijing or Washington is more successful in “strengthening partnerships and alliances, providing global public goods, building multilateral institutions, and enhancing their soft power and economic relations worldwide.”

For the moment, Trump’s and Kim’s bloviations about nuclear buttons on their desks remain in the realm of schoolyard fantasy. (Neither arsenal actually functions via desk button, though this is thin reassurance.) But the occasion is an awful reminder that, between them, they share less than eight years of experience in public office—and seven of them are on Kim’s side.