IF THERE is one foreign policy goal to which President Donald Trump is unswervingly committed, it is to make America safe from Kim Jong Un’s nuclear weapons. That was the message the president’s foreign policy team quietly transmitted for most of the past year. Where, in light of Mr Trump’s announcement on May 24th that he had decided to cancel a historic summit with Mr Kim, which was scheduled to take place in Singapore next month, does that ambition now stand?

For context, it is worth noting that Mr Trump’s decision in March to meet with Mr Kim seemed ill-considered but, on balance, probably justifiable. His decision to cancel the meeting, after recent indications that the North Koreans were making a fool of him, had come to seem almost inevitable. And almost everything else about the president’s approach to, ostensibly, the biggest foreign policy challenge of his tenure has appeared chaotic and potentially disastrous.

Mr Trump agreed to meet Mr Kim after South Korean diplomats brought him a message that the North Korean dictator was prepared to put his nuclear weapons up for negotiation in return for talks. Many Korea watchers expressed alarm. It seemed possible Mr Trump was not aware of North Korea’s long history of seeking direct talks with America, or of its past promises to abandon its nuclear weapons, or the bad faith and broken promises that have at all times characterised its nuclear diplomacy. Mr Trump’s alacritous agreement to meet with Mr Kim seemed like a wasted opportunity to exact more concessions, or at least more proof of seriousness, from the rogue regime before honouring it with one-on-one presidential attention.

At risk was not only the success or failure of the promised talks. The worried experts feared Mr Trump, in his eagerness to save face and make a deal, would make a bad deal. Perhaps he would grant Mr Kim’s wish to be recognised as a nuclear power in return for a narrow agreement to protect America. Yet, despite these fears, the summit still seemed like a gamble worth taking.

At the least, America stood to learn more about Mr Kim’s intentions from the promised meeting. It also seemed sensible to direct Mr Trump—who had been demanding options for military action against the rogue nuclear power and last year threatened to unleash “fire, fury and frankly power” against it—away from sabre-rattling. As it turned out, the extent to which Mr Trump proceeded to veer from darkness to light on North Korea looked like an astonishing proof of naivety.

He dispatched Mike Pompeo, his former CIA director and now secretary of state, to Pyongyang to meet Mr Kim twice and heralded their “good relationship”. Last month he praised Mr Kim for being “very open, I think, very honourable”. Visibly buoyed by suggestions from Republican toadies that he already deserved the Nobel peace prize, Mr Trump appeared to believe he was on course to solve one of the world’s most intractable security problems. “They have agreed to denuclearisation (so great for the world),” he tweeted last month. Those who feared he was on course to get played by Mr Kim’s regime, which views its nuclear arsenal as the main guarantor of its survival, were not encouraged by this.

Over the past couple of weeks, such doubts have been vindicated further. It was inevitable that the North Koreans would test America’s resolve to demand their total denuclearisation. But they appear almost to have been ridiculing Mr Trump. Decrying a pro forma and unremarkable US-South Korean military exercise, the Pyongyang regime cancelled planned talks with South Korea and threatened to cancel the planned summit with Mr Trump. It also appeared to backtrack on Mr Kim’s alleged offer to discuss denuclearisation.

A senior official in the North Korean foreign ministry, Kim Kye Gwan, was quoted saying the regime would cancel the summit if the Americans “push us into a corner and force only unilateral nuclear abandonment”. After Mike Pence appeared this week to threaten Mr Kim with regime change if in fact he did not agree to give up his nukes, another senior North Korean diplomat, Choe Son Hui, called the vice president a “political dummy” and threatened America with nuclear war. “As a person involved in the US affairs, I cannot suppress my surprise at such ignorant and stupid remarks gushing out from the mouth of the US vice president.”

In a letter to Mr Kim, that the president appeared to have drafted himself, Mr Trump cancelled the Singapore summit a few hours later. He said his decision was “based on the tremendous anger and open hostility displayed in your most recent statement… You talk about your nuclear capabilities, but ours are so massive and powerful that I pray to God they will never have to be used.”

The distinct impression of wounded presidential pride must have delighted Mr Kim. Indeed, Mr Trump’s letter could hardly have broadcast his feelings of humiliation more clearly. It suggested the two leaders may have spoken on the phone. It made Mr Trump sound like a nuclear-armed jilted lover. “I felt a wonderful dialogue was building up between you and me, and ultimately, it is only that dialogue that matters,” Mr Trump wrote. “If you change your mind having to do with this most important summit, please do not hesitate to call me or write.”

Perhaps Mr Kim will rush to repair the damage. Mr Trump is said to have such a high regard for his negotiating skills that he might not take much persuading to reconvene the cancelled talks. Yet this does not seem likely. The episode looks mainly like a high-powered exercise in educating Mr Trump in the salient fact of North Korean nuclear diplomacy: Mr Kim is not interested in negotiating away his one strategic advantage. If America has no short-term objective short of that—and Mr Trump did not obviously have one—there would be little to discuss.

Given the naivety Mr Trump has demonstrated, that is perhaps for the best. The fear that he would settle for a bad deal with Mr Kim, potentially upsetting the nuclear balance of East Asia by recognising North Korea as a nuclear power, increased with every hubristic tweet he put out on the summit. A recent suggestion by his national security adviser, John Bolton, that the administration viewed Libya’s decision to dismantle its nuclear arms programme as a model for North Korea was perhaps an effort to prevent that worrying outcome. Given that the subsequent fate of Libya’s then dictator, Muammar Qaddafi, who was toppled by an American-backed insurgency, is the thing Mr Kim fears most, it probably also helped persuade the North Koreans to torpedo the summit. Mr Bolton, who has long suggested there is nothing to be gained from such talks, is perhaps relieved.

An alternative fear is that Mr Trump may now return to considering the sort of military action against North Korea that Mr Bolton, almost alone in Washington, has advocated. It seems unlikely, however. The consensus view that there is no conscionable military solution to the North Korea problem has not shifted. Nor has the impression that Mr Trump sees foreign policy primarily as an opportunity to score a win (ideally, with a Nobel prize attached). Perhaps only Mr Bolton could view slaughter on the Korean peninsula as such.

The current international sanctions on North Korea—the toughest in over a decade—will continue. Perhaps Mr Trump will try to make them even more throttling. Yet as his administration’s attention turns increasingly to another nuclear threat, from Iran, it is not difficult to imagine him parking his ambition to rid the world of the North Korea nuclear threat. American policy towards Mr Kim’s dreadful regime has long been one of impotent neglect. It is possible Mr Trump will not revise that much.