– Three American presidents have tried cajoling, threatening and sabotaging North Korea’s efforts to build a nuclear arsenal. Eventually each turned to negotiations, convinced that an isolated, broken country would surely choose economic benefits for its starving populace over the bomb.

President Donald Trump was the fourth to test that proposition, but with a twist: Engaging in the sort of direct negotiation that his predecessors shunned, the president traveled 8,000 miles for his second summit meeting in less than a year with Kim Jong Un, the North Korean leader, betting that his self-described skills as a master negotiator would make all the difference.

As it turned out, it did not. The meeting in Vietnam ended in shambles when Kim insisted on a full lifting of sanctions and, according to Trump, would not agree to dismantle enough of his nuclear program to satisfy U.S. demands. The split underscored the risk of leader-to-leader diplomacy: When it fails, there are few places to go, no higher-up to step in and cut a compromise that saves the deal.

In this case, the price may be high — especially if Kim responds to the failure by further accelerating his production of nuclear fuel and a frustrated Trump swings from his expressions of “love” for the North Korean leader and back to the “fire and fury” language of early in his presidency.

“No deal is better than a bad deal, and the president was right to walk,” said Richard Haass, the president of the Council on Foreign Relations.

“But this should not have happened,” he said. “A busted summit is the risk you run when too much faith is placed in personal relations with a leader like Kim, when the summit is inadequately prepared, and when the president had signaled he was confident of success.”

The outcome on Thursday took everyone by surprise. Trump was so convinced a deal was in the offing that the White House had announced that a “signing ceremony” would be held immediately after a warm lunch between the two leaders. But no one ever sat down at the elegantly set table in the century-old Metropole Hotel, and there was no signing ceremony because there was no communiqué to sign.

For his part, Kim seemed to think he had Trump exactly where he wanted him: desperate for a deal, and in need of a headline-making victory after the devastating testimony of Michael Cohen, Trump’s former lawyer and fixer.

If so, Kim clearly miscalculated.

History suggests that the North Koreans may try to pressure Trump by escalating. And they have the opportunity: Trump not only left Hanoi early, but he also left without any agreement for a freeze on continued North Korean production of nuclear material. That means that the world’s fastest-growing nuclear arsenal will continue to increase in size as negotiations drag on.

In retrospect, there were warning signs that things were going south.

When Secretary of State Mike Pompeo went to Pyongyang to turn a vaguely worded agreement to pursue denuclearization struck at the June meeting in Singapore into reality, Kim declined to see him. When he returned, he got an audience — but no inventory of North Korea’s nuclear weapons, its production facilities and its missiles. Without that, there was no way for the two sides to agree on a timetable for dismantlement.

For months, the North declined to deal with the State Department’s special envoy, Stephen Biegun. And when the North Koreans did, they explored many options, but made clear sanctions relief had to come first.

And on Wednesday night, when Trump and Kim met again at the Metropole, it was clear from the body language that something had changed since their first warm embrace in Singapore eight months ago.

Trump, who said over the weekend that he would be happy just to have a continued ban on missile and nuclear testing, realized that if he acceded to Kim’s demand for an end to sanctions, he would lose whatever leverage the United States possessed.

“I’d much rather do it right than do it fast,” the president told reporters before leaving Hanoi.

One of the most telling obstacles in the negotiations was over a facility called Kangsun, which the North Koreans have never publicly acknowledged. Detected by U.S. intelligence agencies nearly a decade ago, the site, in a suburb of the capital, Pyongyang, is believed to be a secret nuclear enrichment plant.

Trump’s team of negotiators believed that the North’s willingness to let inspectors into the plant, and ultimately shutter it, would be a good test of Kim’s commitment to denuclearization.

By Trump’s account, Kim would not take up such issues until the world lifts the economic pressure on North Korea. “He wants the sanctions off,” he said.

Now the question is whether Trump will continue his form of personal-relationship diplomacy or decide that the risks are too great, and that he should return to the step-by-step approach most of his predecessors used.

“Look, there has to be a reason for the conversations,” Pompeo told reporters late Thursday. “There has to be a theory of the case of how to move forward. I’m confident there is one.”

He just didn’t say what it was.