1, 2014 file photo, Kenneth Bae speaks to the Associated Press in Pyongyang, North Korea. The US announces Saturday the release of Americans Bae and and Matthew Todd Miller who were detained in North Korea, saying they're on way home. In this image taken from video, U.S. citizen Matthew Todd Miller speaks at an undisclosed location in North Korea Friday, Aug. 1, 2014. The US announced Saturday the release of Americans Miller and Kenneth Bae who were detained in North Korea, saying they're on way home. President Barack Obama comments on the prisoner release from North Korea following an announcement for U.S. Attorney Loretta Lynch to be the next Attorney General, Saturday, Nov. 8, 2014, in the Roosevelt Room of the White House in Washington. The president said he is "very grateful" that North Korea has released the last two Americans in its custody. WASHINGTON (AP) - Two Americans held by North Korea were on their way home Saturday after their release was secured through a secret mission by the top U.S. intelligence official to the reclusive Communist country. 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. Miller and Bae were scheduled to arrive at Joint Base Lewis McChord south of Seattle shortly after 9 p.m., said a Bae family spokesman. 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. A senior administration official said Clapper carried a brief message from Obama indicating that Clapper was his personal envoy to bring the two Americans home. The official spoke on a condition of anonymity without authorization to speak on the record. 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 U.N. 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. "Their release has been our focus every single day and we've been working all the angles available to bring them home," Secretary of State John Kerry said from Oman on Saturday. We're pleased that this humanitarian gesture has taken place. 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. Terri Chung, Bae's sister, said she received word from the State Department Saturday morning that Bae and Miller were on a plane that had left North Korean airspace. We have been waiting for and praying for this day for two years. This ordeal has been excruciating for the family, but we are filled with joy right now," Chung said in an emailed statement. Derek Sciba, a Bae family friend and spokesman, said Chung and Bae's mother would greet him at the Washington state military base. 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. Joseph DeTrani, the former North Korea mission manager for the DNI, said the releases are a hopeful sign that North Korea "wants to come out of the penalty box." "The North Koreans want to come back to negotiations," said DeTrani, who leads an intelligence contractor trade group. They are going through a bad patch. The last two years have been a disaster. They are more and more of an isolated state. We're seeing an outreach - the leadership in Pyongyang is saying, 'We've got to change course, it's not working.' 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, White House Correspondent Julie Pace, Associated Press writer Nedra Pickler, AP National Security Writer Lara Jakes in Muscat, Oman, AP writer Manuel Valdes in Seattle and AP writer John Seewer in Toledo, Ohio, contributed to this report.