North Korea released three U.S. citizens imprisoned for more than a year and allowed them to fly home with Secretary of State Mike Pompeo, removing a source of diplomatic friction between Washington and Pyongyang ahead of a summit between the leaders of the two adversaries that appeared set for Singapore.

The three men—Kim Dong-chul, Tony Kim and Kim Hak-song—flew out of Pyongyang on Mr. Pompeo’s plane, according to a Twitter message Wednesday morning by President Donald Trump.

The detainees “seem to be in good health,” Mr. Trump wrote, adding that he would greet them at Joint Base Andrews in Maryland when they arrive at 2 a.m. Thursday.

The three Americans were all able to walk on the plane without assistance, according to a White House statement that said Mr. Trump regarded North Korean leader Kim Jong Un’s decision to release the trio as “a positive gesture of goodwill.”

The three freed Americans issued a statement thanking the U.S. government for facilitating their release. It was provided Wednesday night by the State Department after Mr. Pompeo made a brief stop in Anchorage, Alaska, en route to Washington.