Washington - For President Donald Trump, Kim Jong Un may be the deal that got away.

Trump and his team weathered insults, tolerated unanswered phone calls and waited hours for negotiating partners who never showed up as they sought to keep the planned Singapore summit with Kim on track.

With prospects dimming and aides increasingly skeptical, Trump at first clung to his plans to meet with the North Korean leader, seeking to pull off what the president saw as a history-making nuclear deal. A self-professed master negotiator, Trump could envision Nobel laurels in the offing of the unprecedented one-on-one meeting.

Eager for a dramatic moment and a bold accomplishment, Trump agreed to Kim’s March overture for a summit in less than an hour, ignoring the warnings of seasoned advisers who said it could backfire.

But on Thursday morning, Trump determined that — for now anyway — the meeting was an unrequited diplomatic dream, his hopes appearing to dissolve in a tale of broken promises.

Late Wednesday, Trump had been briefed on the latest round of increasingly belligerent messages from North Korea, including a threatened “nuclear-to-nuclear showdown.” It confirmed the mounting suspicions of the president’s aides that North Korea was not serious about the talks. Before taking action, Trump decided to sleep on it. The next morning, he consulted with Secretary of State Mike Pompeo and national security adviser John Bolton before deciding to scrap the summit.

He dictated a letter to Kim that at times felt like a wistful plea for what might have been.

“I felt a wonderful dialogue was building up between you and me,” Trump wrote. “Some day, I look very much forward to meeting you.”

To Trump, a chance at a nuclear deal was irresistible, offering an opportunity to tackle what his predecessor, Barack Obama, described to him as the most intractable and urgent security threat facing the U.S. North Korea’s advanced nuclear and missile programs have bedeviled American leaders for a generation, and the costs of a potential military strike to force the nation to abandon its atomic weapons has always been sobering.

There had been hopeful signs: Kim welcomed Pompeo to Pyongyang twice, said he did not object to a U.S. military presence in South Korea and indicated he was willing to discuss abandoning the country’s nuclear arsenal. For a time, it seemed that progress was possible and the president’s unpredictable approach could yield historic gains and an only-Trump-could-go-to-Pyongyang moment.

Now, Trump is blaming Kim’s trip to China two weeks ago for bringing about an unwelcome “change in attitude” by the Korean leader. His supposed concessions soon appeared to ring hollow. First, Kim’s government backed out of planned peace talks with South Korea, citing joint U.S.-South Korean military drills. Then, it threatened to call off the Singapore summit over Trump’s insistence that the North give up its weapons.

Still, the Trump administration tried to keep up a positive face, dismissing the shifts as an expected negotiating maneuver by Kim and stressing there had been no official notification from the North of any change to the meeting.

In fact, they weren’t hearing anything.

Senior White House officials who went to Singapore to meet their North Korean counterparts last week were stood up, officials said. And Pompeo, testifying on Capitol Hill, said North Korea had not responded to repeated requests from U.S. officials to discuss logistics for the summit.

“We got a lot of dial tones, senator,” he told Senate Foreign Relations Committee Chairman Bob Corker.

And when North Korea dismantled its nuclear testing site Thursday, just hours before Trump pulled out of the summit, U.S. officials said Kim had reneged on a pledge to allow international observers to verify its destruction.

At a late afternoon briefing Thursday, a senior administration official described the recent interactions between the U.S. and North Korea as “a trail of broken promises.”

Asked why the US didn’t withdraw from the summit after that, the official said the White House had “been willing to give the North Koreans every opportunity within reason to consummate this meeting.”

In recent months, Trump had traded his bellicose threats of “fire and fury” for bouquets of flattery, calling Kim “very honorable” and exuding confidence that he could seal a deal that had eluded his predecessors for generations.

The lengths to which the administration went to keep the meeting on track reflected Trump’s personal interest in seizing the opportunity, but also an effort to shift blame to his mercurial negotiating rival.

Trump believed that bringing detente to the Korean Peninsula could bolster his approval ratings, help inoculate him against the investigations swirling around him and maybe even trickle down to help Republicans in the midterm elections. Drawn to big moments and bigger headlines, Trump viewed the North Korea summit as a legacy-maker, believing that the combustible combination of his bombast and charm could produce warmer relations between North and South.

Trump aides had warned the president that agreeing to a sit-down with Kim was in itself a concession to the leader of an oppressive government that has longed for international recognition. And likewise, they stressed to Trump that pulling out could undercut American assertions that it seeks a peaceful solution to the nuclear crisis.

Still, Trump did not come away with nothing. The two-month flirtation helped secure the release of three Americans held in North Korea. Trump himself welcomed them back to the U.S. in a middle-of-the-night ceremony.

The president who has positioned himself as the ultimate deal-maker followed a hard lesson from his own negotiating playbook: he walked away.

At least for now.

“If you change your mind having to do with this most important summit,” Trump wrote, “please do not hesitate to call me or write.”