North Korea is responding to U.S. President Donald Trump's decision to cancel a planned summit between the leaders of the two countries, saying it is ready to talk.

Kim Kye-gwan, North Korea's foreign minister, said in a statement published by state-run media that the U.S. decision was not in line with the "world's desire."

"We tell the United States once more that we are open to resolving problems at any time in any way," he said.

Trump said that the U.S. decided to walk away from the June 12 meeting with Kim Jong-un because of "open hostility" in Kim's most recent statement.

The public letter addressed to the North Korean regime was released Thursday by the White House.

"Sadly 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," said Trump.

Trump said in the letter, and in a subsequent address at the White House, that he still looked forward to meeting Kim one day but expressed regret that a "wonderful dialogue" had taken a turn.

"The world, and North Korea in particular, has lost a great opportunity for lasting peace and great prosperity and wealth," the president said.

The full letter from the President Trump to Chairman Kim Jong Un : <a href="https://t.co/RJD9qV0HSl">https://t.co/RJD9qV0HSl</a> <a href="https://t.co/b0BEf0mKWf">pic.twitter.com/b0BEf0mKWf</a> —@WhiteHouse

Trump said he believed "Kim Jong-un wants to do what's right" in response to a reporter's question, but said earlier that the U.S. will continue its campaign of maximum pressure to get North Korea to abandon its nuclear program.

'We have to get it right'

Trump said he had informed the Pentagon and allies South Korea and Japan of his decision.

The president said he hoped North Korea would re-engage in constructive dialogue but that the U.S. military was "more than ready" to respond to any reckless actions.

"Nobody should be anxious, but we have to get it right," he said.

Donald Trump says he's waiting for Kim Jong-un to engage in 'constructive dialogue' after calling off North Korea summit. 0:50

A sitting U.S. president has never met face to face with the three members of the Kim family who have ruled North Korea for several decades, but hopes sprang up after a surprising chain of events in recent weeks.

The response from the Americans comes as North Korea claimed on Thursday to have demolished its sole nuclear test site before a gathering of select foreign journalists, though not international inspectors.

In recent days, however, North Korea had dialled up its rhetoric, focusing on comments made by U.S. Vice-President Mike Pence and National Security Adviser John Bolton in interviews.

The North Korean government referred to Pence as a "political dummy" and said it was just as ready to meet in a nuclear confrontation as at the negotiating table. Bolton's comments were poorly received as he compared North Korea to Libya, where dictator Moammar Gadhafi was ultimately deposed and killed sometime after halting his pursuit of nuclear weapons.

Trump's Secretary of State Mike Pompeo, in his previous capacity as CIA director, has met with Kim. But doubts began to emerge that the summit between Trump and Kim would come off as early as last week, when North Korea called off planned talks with South Korea, which has been mediating between the two countries.

Pompeo read Trump's letter in its entirety Thursday as the Senate's foreign relations committee hearing got underway on Capitol Hill.

In the letter, Trump, as he has in the past, boasted about the "massive and powerful" nuclear capabilities of the U.S.

"I pray to God they will never have to be used," Trump wrote.

Trump hinted on Tuesday while meeting with South Korea President Moon Jae-in at the White House that there was "a very substantial chance" the summit, which was to be held in Singapore, would not happen.

Robert Kelly, a professor of international relations in South Korea, said the North Koreans are "so mercurial" that it's hard to know how they will respond.

"The North Koreans just don't take very well to being called out in public and that's what this was," he told CBC News Network's Andrew Nichols.

Kelly said more diplomacy is required all around and that the South Korean president in particular will need to do a lot of work to try to get a summit back on track.

South Korea questions 'Trump's intention'

According to Yonhap news agency, Moon said he's "very perplexed" that the U.S.-North Korea summit won't go ahead as planned.

Speaking at an emergency meeting of his top security officials, the South Korean president said "denuclearization of the Korean Peninsula and the establishment of permanent peace are historic tasks that can neither be abandoned nor delayed."

Earlier, Pompeo told the U.S. senators that the administration and South Korea were in "lockstep" with respect to the decision, but said he didn't want to specify which countries were notified ahead of time.

Mike Pompeo is shown meeting with North Korean leader Kim Jong-un in Pyongyang, North Korea, in a photo that the White House said was taken over Easter weekend 2018. (U.S. Government via Reuters)

Relations between the Koreas had thawed this year, beginning with North Korean participation in the Winter Olympics in Pyeongchang in February, and including a summit on April 27, in which Kim became the first North Korean dictator to set foot in the South.

Trump suggested this week that recent meetings between Chinese President Xi Jinping and Kim may have played a part in stalling momentum for the summit.

"President Xi is a world-class poker player," Trump said.

China publicly supported the planned summit, and Pompeo told the committee that just Wednesday China's foreign ministry told the U.S. that denuclearization of the Korean Peninsula was in its interests.

Pompeo said in testimony on Thursday that a U.S. team was "fully engaged" and ready for Singapore but received no responses from North Korea on outreach for summit planning.

Trump agreed to a potential North Korea summit in March after meeting with South Korea officials, but on Tuesday when President Moon Jae-In, right, visited the White House, he sounded more skeptical it would take place as scheduled. (Carlos Barria/Reuters)

"I regret the statements that North Koreans have made over the past few days and the fact that we have not been able to conduct the preparation between our two teams that would be necessary to have a chance for successful summit," he said.

Pompeo had recently helped broker the return of three Americans who had been detained in North Korea.

Bellicose threats last year

Trump had agreed to a summit, hastily, some analysts argued, in March after meeting with South Korean officials at the White House. He then confirmed the selection of Singapore as a site on May 10.

Democratic congressional leaders Nancy Pelosi and Charles Schumer were quick to pounce on the cancellation, with Pelosi telling reporters that Kim emerges as "the big winner" for having fooled Trump, and Schumer suggesting on social media that the summit was doomed to fail.

Many of us feared that the summit between <a href="https://twitter.com/POTUS?ref_src=twsrc%5Etfw">@POTUS</a> & Kim Jong-Un would be a great show that produced nothing enduring. If a summit is to be reconstituted, the US must show strength & achieve a concrete, verifiable, enduring elimination of Kim Jong-Un’s nuclear capabilities. —@SenSchumer

Late last year, Trump and Kim were exchanging a series of insults, derisive nicknames and nuclear threats after North Korea's progressive series of ballistic missile tests conducted over a period of months.

In September 2017, Trump said in a speech at the United Nations that "Rocket Man" was on a "suicide mission," one month after making the so-called "fire and fury" threat. Kim, for his part, referred to the U.S. president as a "dotard" soon after Trump's UN address.