President Trump on Thursday canceled the highly anticipated summit with North Korea that had been set for next month, calling the talks “inappropriate” following the “hostility” displayed in the latest comments from dictator Kim Jong Un.

The move to pull out of the summit, slated to take place in Singapore on June 12, came after threats from Kim to call off the talks. In a letter to Kim on Thursday, Trump said the world, and North Korea, had lost a "great opportunity for lasting peace and great prosperity."

“Based on the tremendous anger and open hostility displayed in your most recent statement, I feel it is inappropriate, at this time, to have this long-planned meeting,” Trump wrote in a letter to Kim on Thursday. “Therefore, please let this letter serve to represent that the Singapore summit, for the good of both parties, but to the detriment of the world, will not take place.”

North Korea has for days questioned whether the summit would go forward.

On Thursday, Vice Minister of the North Korean Foreign Ministry, Choe Son Hui, also said that whether the U.S. "will meet us at a meeting room or encounter us at nuclear-to-nuclear showdown is entirely dependent upon the decision and behavior of the United States," according to South Korea's Yonhap News Agency.

The official also insulted Vice President Pence after he said North Korea had asked for the meeting.

"As a person involved in the U.S. affairs, I cannot suppress my surprise at such ignorant and stupid remarks gushing out from the mouth of the U.S. vice president," Choe reportedly said.

Officials, though, told Fox News that it was the threat of nuclear war -- not the insult to Pence -- that led to the summit pullout.

“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,” Trump wrote to Kim. “If you change your mind having to do with this most important summit, please do not hesitate to call me or write. The world, and North Korea in particular, has lost a great opportunity for lasting peace and great prosperity and wealth.”

Trump added, “This missed opportunity is truly a sad moment in history.”

The president also expressed his gratitude for the release of the three American hostages from North Korea earlier this month.

Secretary of State Mike Pompeo had traveled to North Korea on a surprise diplomatic mission to retrieve the American prisoners, and even met with Kim in preparation for the summit.

“I want to thank you for the release of the hostages who are now home with their families,” Trump wrote. “That was a beautiful gesture and was very much appreciated.”

AMERICAN PRISONERS HELD IN NORTH KOREA ON THEIR WAY HOME AFTER POMPEO VISIT, TRUMP SAYS

He added, “Some day, I look very much forward to meeting you."

Pompeo, who had met with Kim in North Korea, testified on Capitol Hill Thursday before the Senate Foreign Intelligence Committe, to discuss the State Department's budget as the news from the White House broke.

"I can add, over past many days, that we have endeavored to do what Kim and I agreed, put teams togehter in advance of the summit, and we received no response from North Korea," Pompeo said. "The American team was rocking, were ready, and fully prepared for this meeting."

Pompeo added that there was "little doubt" that Kim understood "the scope" of what the U.S. was requesting.

"We made this abundantly clear through multiple channels," Pompeo said. "I regreat statements North Korea made over the past few days, and that we haven't been able to conduct prep necessary for a successful summit."

The anticipated summit was set to come on the heels of a “historic meeting” between North and South Korea last month, as leaders from the two nations pledged to clear the peninsula of nuclear weapons.

Moon and Kim announced they would work to achieve a “nuclear-free Korean Peninsula,” and also expressed hope to officially end the 1950-53 Korean War by the end of the year, though it is not clear at this point the steps the leaders will take to achieve denuclearization.

“KOREAN WAR TO END! The United States, and all of its GREAT people, should be very proud of what is now taking place in Korea!” Trump tweeted last month.

The leaders had agreed that by May 1, the loudspeaker propaganda broadcasts that had been blaring from each side of the heavily armed border would be suspended. They agreed to also dismantle broadcasting equipment and stop flying propaganda leaflets across their border.

TRUMP TOUTS 'HISTORIC' KOREAN SUMMIT: 'KOREAN WAR TO END'

Kim also promised Moon that he “won’t interrupt” his “early morning sleep anymore,” referring to missile tests, South Korea said.

But Kim’s tune changed last week, canceling a high-level summit with Moon, following U.S.-South Korean military exercises, which the state-run Korean media outlet suggested were a rehearsal for a potential invasion of the North.

During Trump's meeting on Monday with Moon in the Oval Office, the South Korean president expressed confidence in the summit, and in "the future of Kim."

But Trump said "maybe it will happen later."

"In the end, it will work out. I can't tell you how or why, but in the end it will work out," Trump said. "It always does."

Fox News' John Roberts and Adam Shaw contributed to this report.