U.S. citizens Kenneth Bae and Matthew Todd Miller have been released from North Korea, where they were detained for two years and seven months, respectively, the U.S. State Department announced Saturday.

“The safety and welfare of U.S. citizens abroad is the Department of State’s highest priority, and the United States has long called on [the Democratic People’s Republic of Korea] authorities to release these individuals on humanitarian grounds,” spokesperson Jen Psaki said in a statement.

James Clapper, the director of national intelligence, took part in discussions with North Korea about Bae’s and Miller’s release. Accompanied by Clapper, the two were en route back to the U.S. to be reunited with their families Saturday.

“We welcome the DPRK’s decision to release both Mr. Bae and Mr. Miller,” said Brian P. Hale, the director of public affairs for the Office of the Director of National Intelligence, in a statement.

President Obama welcomed the news Saturday morning. “It’s a wonderful day for them and their families,” he said. “Obviously we are very grateful for their safe return and I appreciate director Clapper doing a great job on what was obviously a challenging mission.”

Another hostage, Jeffrey Fowle, was released from detainment on Oct. 21.

Write to Nolan Feeney at nolan.feeney@time.com.