Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Three Americans held in North Korean labor camps were free and back in the U.S. Wednesday afternoon, the State Department said.

Kim Hak-song, Kim Dong-chul and Kim Sang-duk, who is also known as Tony Kim, were released by Kim Jong Un's regime after spending up to two years in detention, President Donald Trump confirmed in a tweet earlier in the day.

Two planes, one carrying the former detainees and another with Secretary of State Mike Pompeo aboard, landed in Anchorage, Alaska, Wednesday afternoon, en route to Join Base Andrews. Trump said in a tweet that he was "looking forward to greeting the Hostages (no longer) at 2:00 A.M."

In a statement provided by the State Department, the men expressed "deep appreciation to the United States government, President Trump, Secretary Pompeo and the people of the United States for bringing us home. 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."

Pompeo was in Pyongyang, the North Korean capital, to finalize a date and place for historic face-to-face talks between Trump and the North Korean leader.

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. — Donald J. Trump (@realDonaldTrump) May 9, 2018

Secretary Pompeo and his “guests” will be landing at Andrews Air Force Base at 2:00 A.M. in the morning. I will be there to greet them. Very exciting! — Donald J. Trump (@realDonaldTrump) May 9, 2018

"The three Americans appear to be in good condition and were all able to walk on the plane without assistance," Pompeo said in a statement. "All Americans look forward to welcoming them home and to seeing them reunited with their loved ones."

Their release was confirmed to Pompeo only two hours before his plane took off, after a day of talks.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A North Korean official came to the Koryo Hotel at 7 p.m. local time (6 a.m. ET) to say Kim had granted the three detainees amnesty. The official told Pompeo that he should make sure they "do not make the same mistakes again," according to a U.S. official who was present.

The detainees were collected 45 minutes later from another hotel and taken to the Pyongyang airport, where the entire entourage took off at 7:45 a.m. ET.

Pompeo told reporters on the plane that the Trump-Kim summit date would be announced "in short order."

I had productive meetings in Pyongyang with Chairman Kim Jong-un and made progress. I'm delighted to bring home three Americans. — Secretary Pompeo (@SecPompeo) May 9, 2018

Vice President Mike Pence credited Trump’s “tough-minded diplomacy” for the release and said pressure on Kim’s regime would not cease until Pyongyang gives up its nuclear program.

"This is a proud and memorable moment for America," he said in a statement.

Tony Kim’s family said they were grateful to “all of those who have worked toward and contributed to his return home,” and also thanked Trump “for engaging directly with North Korea.”

“We ask that you continue to pray for the people of North Korea and for the release of all who are still being held,” they said in a statement.

Detaining — and then releasing — U.S. citizens has given Pyongyang leverage in negotiations with Washington in the past.

North Korea last year released Otto Warmbier, a 22-year-old University of Virginia student who was convicted of "hostile acts" in 2016 after visiting Pyongyang. However, he was left in a coma after his labor camp ordeal and died days after returning to Ohio.

In a statement, Warmbier's family said they were "happy for the hostages and their families," adding, "We miss Otto."

Otto Warmbier is taken to a court in Pyongyang, North Korea, in 2016. Kyodo News Service, via Reuters

Tony Kim, 59, was detained at Pyongyang Airport in April 2017 as he was preparing to leave the country. The Korean-American accounting professor had been working at the Pyongyang University of Science Technology, an institution privately funded by Christian groups in the West.

Kim Hak-song, who was also working at the Pyongyang Science and Technology University, was held in May 2017 for "hostile acts against the republic.” The institution said Kim was doing agricultural development work not connected with the university.

Kim Dong-chul during a news conference in Pyongyang in 2016. KCNA via KNS / AFP — Getty Images

The longest-held was Kim Dong-chul, who was sentenced to 10 years in prison with hard labor in April 2016 for espionage and subversion. Paraded before cameras ahead of his trial, he said he had spied for South Korean intelligence authorities in a plot to bring down the North's leadership and had tried to spread religion among North Koreans. However, South Korea's National Intelligence Service said his case wasn't related to the agency in any way.

Despite the imminent release of the three, the U.S. last week slammed the North Korean regime over human rights.