WASHINGTON -- 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 Joint Base Lewis-McChord in Washington state with James Clapper, the director of national intelligence, CBS News correspondent Margaret Brennan reports. 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 Obama said at the White House following his announcement of Loretta Lynch as 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."

According to a senior administration official, Clapper carried a "brief message" from Mr. Obama saying that Clapper was his personal envoy to bring the two Americans home, Brennan reports.

Get Breaking News Delivered to Your Inbox

Clapper flew into Pyongyang aboard a plane piloted by the U.S. Air Force, Brennan reports. He did not stay overnight but was on the ground for "several hours," according to a senior U.S. official. There were other U.S. officials in the delegation, but the official did not disclose the exact size.

The Americans' release does not signify an opening in the relationship between North Korea and the U.S., Brennan reports. A senior State Department official said that the U.S. did not give the North Koreans anything in exchange for the release other than sending Clapper. There is "no quid pro quo," the official said.

The State Department official said that the issue of North Korea's nuclear program was not linked to the release of Bae and Miller, but the official also said that Clapper was "prepared to listen" to what North Korea had to say about the nuclear issue.

File photos of Matthew Todd Miller, left, and Kenneth Bae, two U.S. citizens who had been imprisoned in North Korea. Both were freed from detention by the North Korean government and are returning to the United States, the U.S. government said Nov. 8, 2014. Reuters/Kyodo; AP Photo/Wong Maye-E

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.

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.

"I wouldn't do it again, but at the time I felt like I had to do it," he told CBS News correspondent Dean Reynolds last month. "I was doing what I thought God wanted me to do."

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.

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, Brennan reports.