In the months leading up to this week’s nuclear summit in Hanoi, President Trump flaunted his blossoming bromance with North Korean leader Kim Jong Un.

“We have a good chemistry together,” Trump said last June, and since then, the pair have reportedly grown closer. By September, the feelings had become even more intense: “We fell in love,” Trump told the crowd at a rally in West Virginia.

The burgeoning relationship was on full display in Hanoi during the first day of denuclearization talks. In photos, the two leaders stood side by side with smiles plastered on their faces. They found time for a leisurely poolside stroll and enjoyed a multicourse dinner that included shrimp cocktail, sirloin steak and chocolate lava cake. Trump was so confident a deal would be reached that the White House announced that a joint signing ceremony had been scheduled, The Post’s Philip Rucker and Josh Dawsey reported.

“When this summit started, it seemed like love was still in the air,” Trevor Noah told his studio audience Thursday on “The Daily Show.”

But on Thursday, Trump and Kim abruptly cut the summit short. There would be no signing ceremony, no working luncheon and no deal. The unexpected collapse of talks surprised social media users and late-night hosts who all had the same question: What caused the love affair to sour?

“Well, it’s the same thing that turns most relationships sour,” Noah explained. “They both just wanted different things.”

Speaking to reporters at a news conference in Hanoi, Trump said Kim had wanted the U.S. to lift all economic sanctions against North Korea and in turn the country would close one nuclear facility.

“Sometimes you have to walk, and this was just one of those times,” Trump said. (North Korean officials later pushed back against the president’s characterization of the negotiations, The Post reported.)

On Comedy Central, Noah attempted to lay out Trump and Kim’s complicated bromance for his viewers.

“Trump and Kim fell in love,” the host said. “I know that sounds weird, but when you think about it, Kim Jong Un is totally Donald Trump’s type."

“All of Trump’s best relationships are with people who are half his age and don’t speak English,” Noah added, a picture of first lady Melania Trump appearing on the screen. “It works. That’s when the relationship be best.”

In Hanoi, the pair were forced to face what Noah described as a “classic relationship dilemma.” The host then launched into a made-up conversation between Trump and Kim.

Impersonating Trump, Noah demanded to know why Kim wouldn’t let him check his nuclear sites.

“Oh you don’t trust me, man?” a defensive Noah, pretending to be Kim, asked. “If I say there’s no nukes, there’s no nukes, man. You wanna check my sites? Fine, check the sites.”

But when the fictional Trump tried, Noah-as-Kim flipped out.

“No, you’re not gonna check the sites,” Noah yelled. “There’s no love without trust, Donny, that was a test. China was right about you. I’m out.”

“No Kim, wait, Kiiiiim,” cried Noah, letting out loud sobs. “I need to build a wall around my heart.”

In real life, however, Noah noted that Trump still seemed to believe he could salvage the relationship, playing a clip of the president describing how the leaders parted amicably.

“There’s a warmth that we have, and I hope that stays. I think it will,” Trump told reporters in Hanoi. “I want to keep the relationship.”

Noah’s face contorted into a look of pity.

“Aw shame, Donald, this is so tough to watch, man,” the host said. “We’ve all been there. . . . You told your friends this was going to work out, and despite the warnings you still carried on and now you’re trying to save face because you think everyone’s judging you, which we totally are.”

He continued, offering the president some blunt advice: “But instead of dragging this out, Donald, I think it’s time to accept that maybe, just maybe, Kim is just not that into you.”

Over on NBC, the status of the Trump-Kim bromance also caught the attention of Jimmy Fallon.

“I don’t want to call it a breakup, but for the whole 20-hour flight home, Trump was blasting Taylor Swift,” Fallon joked.

Beyond dissecting rumors of a breakup, late-night hosts could not resist poking fun at other moments during the summit, and its less-than-optimal result.

Seth Meyers fixated on Trump and Kim shaking hands in front of photographers.

“It wouldn’t be a Trump summit with a world leader without a super weird handshake,” Meyers said, playing a clip of Trump appearing to karate chop the air before grasping Kim’s hand.

“Trump always shakes hands the way a 7-year-old boy would think a big important businessman shakes hands,” Meyers quipped. “I’m going to go in for the chop, then up and down real hard, and then I say good job with the files, we should do golfing sometime.”

On ABC, Jimmy Kimmel ripped Trump for failing to reach a deal and coming home “tiny-empty-handed.”

“Trump got more done in his summit with Kim Kardashian than with Kim Jong Un,” Kimmel said.

Kimmel added that what happened in Hanoi was shocking because “nobody makes a bigger deal about making big deals than Donald Trump.” The host proceeded to show more than 25 clips of the president bragging about his “great deals.”

“To recap, he flew all the way over there and got nothing, like the Fyre Festival,” the host said, likening the Hanoi summit to the infamous failed music event.

On social media, amid serious discussion about what global impact the summit could have, some continued seeking answers to what the meeting’s outcome means for Trump and Kim on a personal level.

“Is Trump going to give the engagement ring back to Kim?” one Twitter user asked.