Joint Base Andrews, Washington: U.S. President Donald Trump welcomed three former U.S. prisoners at a military base near Washington on Thursday, thanking North Korean leader Kim Jong Un for their release and sounding upbeat on a planned summit between the two sides.

The prisoners, freed after U.S. Secretary of State Mike Pompeo traveled to the North Korean capital, landed at Joint Base Andrews outside Washington, where a giant U.S. flag was suspended between ladders of two fire trucks on the edge of the taxiway.

Trump and his wife, Melania, boarded the plane for about five minutes before the men stepped out, shaking hands with the president and waving to waiting media and military personnel.

"Frankly we didn't think it was going to happen and it did," Trump said after thanking Kim for releasing the men.

"We’re starting off on a new footing. This is a wonderful thing that he released the folks early."

Trump said he believed Kim wanted to bring North Korea "into the real world" and was hopeful of a major breakthrough at their planned meeting.

"I think we have a very good chance of doing something very meaningful," Trump said.

"My proudest achievement will be - this is part of it - when we denuclearize that entire peninsula."

Trump and Kim engaged in a bellicose exchange of rhetoric last year over North Korea's development of nuclear missiles capable of reaching the United States in defiance of U.N. Security Council resolutions. Tensions began to ease, coinciding with the North's participation in the Winter Olympics in South Korea in February.

Details of the planned summit have yet to be announced, but one U.S. official said Singapore had emerged as the most likely venue. Trump said it would be held in a few weeks' time.

A White House spokeswoman said the three former prisoners would be taken to Walter Reed National Military Medical Center in nearby Maryland for further medical evaluation.

They are Korean-American missionary Kim Dong-chul, detained in 2015 and sentenced in 2016 to 10 years' hard labor; Kim Sang-duk, also known as Tony Kim, who spent a month teaching at the foreign-funded Pyongyang University of Science and Technology (PUST) before he was arrested in 2017; and Kim Hak-song, who also taught at PUST and was detained last year.

"I was treated in many different ways, but overall labour to do much labor and when I became ill I received some treatment," Kim Dong-chul said via a translator.

The three had earlier given their thanks in a statement released by the State Department as their plane stopped over in Alaska.

"We would like to express our deep appreciation to the United States government, President Trump, Secretary Pompeo, and the people of the United States for bringing us home," the men said.

"We thank God, and all our families and friends who prayed for us and for our return. God Bless America, the greatest nation in the world."

North Korean state media said they were arrested either for subversion or "hostile acts" against the government.

Until now, the only American released by North Korea during Trump’s presidency was Otto Warmbier, a 22-year-old university student who returned to the United States in a coma last summer after 17 months of captivity and died days later.

Warmbier's death escalated U.S.-North Korea tensions, already running high at the time over Pyongyang's stepped-up missile tests.

SINGAPORE LIKELY

The release of the last U.S. detainees in North Korea appeared to signal an effort by Kim to improve the tone for the summit and followed his recent pledge to suspend missile tests and shut a nuclear bomb test site.

A U.S. official, speaking on the condition of anonymity, said Singapore had emerged as the likeliest location for the planned summit after Trump ruled out holding it at the heavily fortified demilitarized zone between North and South Korea.

Trump, who previously said Singapore was under consideration, said agreement had been reached on a date and said the venue and details would be announced within three days.

The release was a dramatic win for Trump’s embattled White House at a time when his foreign policy has come under withering criticism after he withdrew from the Iran nuclear deal. His administration is under intense scrutiny by a special investigator looking at alleged Russian interference into his 2016 presidential election and has also been under fire for a series of ethics violations and chaotic personnel turnover.

But there was no sign that Pompeo's visit had cleared up the question of whether North Korea would be willing to bargain away nuclear missiles that might threaten the United States.

Trump has credited his "maximum pressure" campaign for drawing North Korea to the table and has vowed to keep sanctions in place until Pyongyang takes concrete steps to denuclearize.

But former spy chief Kim Yong Chul, director of North Korea’s United Front Department, said in a toast to Pompeo over lunch in Pyongyang: “We have perfected our nuclear capability. It is our policy to concentrate all efforts into economic progress ... This is not the result of sanctions that have been imposed from outside.”

Bonnie Glaser, an Asia expert at Center for Strategic and International Studies, said that while the release was not an explicit precondition for the Trump-Kim meeting, the North Koreans understood that they had to do it for any progress to be made.

"The North Koreans have still said nothing to indicate that they are willing to give up their nuclear weapons, not to mention permanently and verifiably dismantle their nuclear programs," she said.

"We have no clarity about Kim’s intentions."