American prisoners freed by North Korea meet with Donald Trump The three men all had been detained at least a year.

Three American prisoners just freed from North Korea met with President Donald Trump early Thursday morning after landing at Joint Base Andrews in Maryland.

The three men, Kim Dong Chul, Kim Hak Song and Kim Sang Duk, also known as Tony Kim, each had been detained for more than a year.

"The fact we were able to get them out so soon was a tribute to a lot of things," said Trump, standing on the tarmac at Andrews, surrounded by journalists and cameras. "I just want to say, this is a special night."

"I'm very honored to have helped these great folks, but the true honor is going to be if we have a victory in getting rid of nuclear weapons," Trump continued. "We have a meeting scheduled in a very short period of time. We have the location set. We'll see if we can do something that people did not think was going to happen for many, many years."

"I appreciate Kim Jong Un for doing this," Trump said.

The president wrote in a tweet: "I am pleased to inform you that Secretary of State Mike Pompeo is in the air and on his way back from North Korea with the 3 wonderful gentlemen that everyone is looking so forward to meeting. They seem to be in good health. Also, good meeting with Kim Jong Un. Date & Place set."

This was Pompeo's second trip to North Korea, where he's helping lay the groundwork for a summit between Kim and Trump.

Pompeo is only the second sitting secretary of state to visit North Korea, and he's the highest-ranking U.S. official to meet Kim.

U.S. officials had made it clear to their North Korean counterparts that releasing the three men was paramount.

Sarah Sanders, the White House press secretary, said in a statement Wednesday that the president "appreciates leader Kim Jong Un's action to release these American citizens, and views this as a positive gesture of goodwill. The three Americans appear to be in good condition and were all able to walk on the plane without assistance. All Americans look forward to welcoming them home and to seeing them reunited with their loved ones."

Kim Dong Chul, a South Korean-born businessman and pastor, spent at least 900 days in custody after his October 2015 arrest on allegations he was trying to meet with a former North Korean soldier to receive classified information.

He also was accused of working with South Korea's spy agency, which denied any involvement. He had been sentenced to 10 years of hard labor in April 2016.

Kim Hak Song and Tony Kim both worked at the Pyongyang University of Science and Technology. They were arrested in 2017 and charged with "hostile acts" toward the North Korean state.

The three men, after meeting with Trump, were scheduled to travel to Walter Reed for a medical evaluation.

ABC News' Alisa Wiersema, Karson Yiu, Meghan Keneally and Jordyn Phelps contributed to this report.