Matthew Miller of Bakersfield, California, and Kenneth Bae of Lynnwood, Washington, were flying back to the West Coast with James Clapper, the director of national intelligence, according to U.S. officials. Clapper was the highest-ranking American to visit Pyongyang in more than a decade.
It was the latest twist in the fitful relationship between the Obama administration and the young North Korean leader, Kim Jong-un, whose approach to the U.S. has shifted back and forth from defiance to occasional conciliation. And it was an anomalous role for Clapper, an acerbic retired general who doesn't typically do diplomacy.
"It's a wonderful day for them and their families," President Barack Obama said at the White House following his announcement of his pick for attorney general. "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."
U.S. officials did not immediately provide details about the circumstances of the Americans' release, including whether Clapper met with Kim or other senior North Korean officials. They said the timing was not related to Obama's imminent trip to China, Myanmar and Australia.
But analysts who study North Korea said the decision to free Bae and Miller now from long prison terms probably was a bid by that country to ease pressure in connection with its human rights record. A recent United Nations report documented rape, torture, executions and forced labor in the North's network of prison camps, accusing the government of "widespread, systematic and gross" human rights violations.
North Korea seems worried that Kim could be accused in the international criminal court, said Sue Mi Terry, a former senior intelligence analyst now at Columbia University.
"The North Koreans seem to be obsessed over the human rights issue," she said. "This human rights thing is showing itself to be an unexpected leverage for the US."
Bruce Klingner, a former CIA analyst now at the Heritage Foundation, agreed that efforts to shine a spotlight on the country's human rights record "startled the regime and led to frantic attempts to derail the process."
Bae and Miller were the last Americans held by North Korea.
Bae, a Korean-American missionary with health problems, was serving a 15-year sentence for alleged anti-government activities. He was detained in 2012 while leading a tour group to a North Korea economic zone.
Miller was serving a six-year jail term on charges of espionage after he allegedly ripped up his tourist visa at Pyongyang's airport in April and demanded asylum. North Korea said Miller had wanted to experience prison life so that he could secretly investigate North Korea's human rights situation.
Last month, North Korea released Jeffrey Fowle of Miamisburg, Ohio, who was held for nearly six months. He had left a Bible in a nightclub in the hope that it would reach North Korea's underground Christian community.
Fowle said his fellow Americans' release is "an answer to a prayer." He said he initially thought Bae and Miller had been released with him last month. "I didn't realize they weren't released with me until I got on the plane," he said.
Bae and Miller had told The Associated Press that they believed their only chance of release was the intervention of a high-ranking government official or a senior U.S. statesman. Previously, former Vice President Al Gore and former President Jimmy Carter had gone to North Korea to take detainees home.
Victor Cha, a North Korea expert and former national security official in the George W. Bush administration, said Clapper was the most senior U.S. official to visit North Korea since then-Secretary of State Madeleine Albright went in 2000 and met with Kim Jong-il, Kim Jong Un's father.
In recent years, Syd Seiler, a former CIA officer who was recently designated as the U.S. envoy on the North Korean nuclear issue, has made at least one secret trip to North Korea.
Cha said sending Clapper would have satisfied North Korea's desire for a Cabinet-level visitor, while avoiding some of the diplomatic baggage of dispatching a regular U.S. government official. The U.S. and North Korea do not have formal ties, a legacy of the 1950-53 Korean War that ended without a peace treaty.
The detainee releases do not herald a change in U.S. posture regarding North Korea's disputed nuclear program, the main source of tension between Pyongyang and Washington, said a senior administration official who spoke on condition of anonymity to discuss national security matters.
International aid-for-disarmament talks have been stalled since 2008. The U.S. wants the North to take concrete steps to show it's committed to denuclearization before the talks can resume.
The last concerted U.S. effort to restart those negotiations collapsed in spring 2012. North Korea had agreed to freeze its nuclear and missile programs in exchange for food aid, but then launched a long-range rocket in breach of a U.N. ban on its use of ballistic missile technology.
The U.S. notified allies of Clapper's trip to North Korea and alerted members of the congressional leadership once his visit was underway, the official said.
AP Diplomatic Writer Matthew Lee, AP White House Correspondent Julie Pace and Associated Press writer John Seewer in Toledo, Ohio, contributed to this report.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.