After long stints in labor camps and days of rumors about their release, three Americans who were held prisoner in North Korea finally came home early Thursday morning, shortly before 3 a.m. 

President Trump had announced on Wednesday morning that Kim Hak-song, Kim Sang-duk and Kim Dong-chul were en route to the United States, released as a goodwill gesture ahead of the proposed summit between Trump and North Korean leader Kim Jong Un.

According to The Washington Post, the three men received a quick medical check-up before they boarded the plane home, accompanied by Secretary of State Mike Pompeo. “The doctors are with them now,” Pompeo said. “All indications are their health is as good as could be, given what they’ve been through. They all walked up the stairs themselves through their own power.”

When the three former prisoners arrived at Joint Base Andrews outside Washington, a large American flag was displayed on the tarmac, held by two fire engine cranes. Trump and Vice President Pence, accompanied by their wives, both welcomed the three Americans.

“We want to thank Kim Jong Un, who was really excellent,” Trump said.

Americans held captive in North Korea have described harsh conditions: tiny prison cells, little food and water, little time outside. Detainees are often forced to confess and paraded in show trials, then sentenced to hard labor. “It was a 5-by-6-foot cell, and there were a couple of slats on the doors,” said Laura Ling, an American journalist detained in 2009, describing her cell in a magazine interview after her release. “There were no bars, so you couldn’t see out, and if they closed those slats, it just went completely dark. There was no way to communicate with the outside world."

Another former American captive, Otto Warmbier, was released last June after 17 months in captivity, but he returned to the United States in a coma after suffering extensive loss of brain tissue. He died a week later.

Kim Hak-song had worked for the Pyongyang University of Science and Technology, or PUST, and was detained in May 2017 on suspicion of “hostile acts” against North Korea. According to the university's chancellor, he had been doing agricultural development work with the school’s agricultural farm. PUST, founded in 2010, is led by a Korean American evangelical Christian named James Kim and funded by donations from international churches. Many children of North Korea’s elite study there because it offers classes in English.

“PUST offers a mutually beneficial arrangement for both North Korea and the evangelicals,” wrote Suki Kim, a writer who taught at PUST in 2011, for The Washington Post last year. “The regime gets free education for its youth and a modern facility, which can be used for propaganda, while the evangelicals get a footing in the remote nation.”

Kim Hak-song, himself an ordained evangelical Christian pastor affiliated with Oriental Mission Church in Los Angeles, was born in China and studied in California. “He was a very diligent, hard-working man determined to help people in North Korea,” said David Kim, a classmate, to CNN. “He went to Pyongyang to devote himself to the development of North Korea’s agricultural technology so that the North can be self-sufficient with food.”

In a statement, PUST heralded his release, writing that “all three men have been daily in our thoughts; and our hopes and prayers have been fulfilled by their release.”

Kim Sang-duk, who goes by the name Tony, was detained in April 2017 as he waiting to fly out of Pyongyang. He’d been teaching a month-long class in international finance and management at PUST while serving on the faculty of its sister school in China, the Yanbian University of Science and Technology. PUST’s chancellor said in a statement at the time of Kim Sang-duk’s arrest that he was involved in other activities, including volunteering at an orphanage, while in North Korea. He was in his fifties and had come to teach at the university.

On Wednesday, Kim Sang-duk’s family released a statement thanking “all of those who have worked toward” his safe return. “We also want to thank the President for engaging directly with North Korea. Mostly, we thank God for Tony’s safe return,” the statement read.

Kim Dong-chul, a former Virginia resident, is a businessman.

During a 2016 interview, he told CNN that he’d lived in the Chinese city of Yanji since 2001 and worked in the Rason-Sonbong special economic zone, just over the North Korean border, running ran a trade and hotel services company.

He was accused of spying on the regime and sentenced to 10 years of hard labor in April 2016.

Kim Dong-chul, 64, was born in South Korea and became a U.S. citizen in 1987. In the interview with CNN, he said that he was arrested in October 2015 while meeting with a former North Korean soldier. Pyongyang accused Kim Dong-chul of receiving a USB drive and documents containing North Korean nuclear secrets. At a government-organized news conference, he apologized for trying to steal military secrets in collusion with South Koreans. (South Korea denies this.) He begged for mercy, and called his alleged acts “unpardonable.”

As my colleague Anna Fifield reported, such “‘confessions’ have become part of North Korea’s playbook for detainees.” After their release, “several detainees have described being told what to say by their North Korean captors.”