North Korea pardoned and released two detained American journalists after former president Bill Clinton met in Pyongyang on Tuesday with the country's ailing dictator, a transaction that gives Kim Jong Il a thin slice of the international legitimacy that has long eluded him. Although the White House and the State Department steadfastly insisted that the former president -- the husband of Secretary of State Hillary Rodham Clinton -- was on a 'private humanitarian mission,' the trip came about only after weeks of back-channel conversations involving academics, congressional figures and senior White House and State Department officials, according to sources involved in the planning. North Korea rejected the administration's first choice for the trip -- former vice president Al Gore, who co-founded the television channel that employs the reporters -- and Bill Clinton left the United States only after North Korea provided assurances that the reporters would be released, the sources said. U.S. officials said they hoped Clinton's trip would give Kim a face-saving way to end North Korea's recent provocative actions, such as missile launches and a second nuclear test, and begin the process of returning to the negotiating table on its nuclear programs. The American effort also appears to have been aided by South Korea's government, which in recent weeks has sought to ease tensions with its neighbor. In Pyongyang, the official Korean Central News Agency (KCNA) reported that the release of Laura Ling, 32, and Euna Lee, 36, was ordered after Kim issued a 'special pardon.' The two had been sentenced to 12 years hard labor after they were captured in March near the Chinese border while making a documentary about the trafficking of North Korean women to China. The reporters and Clinton left North Korea on a plane en route to Los Angeles, where the women were to be reunited with their families. 'Clinton expressed words of sincere apology to Kim Jong Il for the hostile acts committed by the two American journalists,' KCNA reported. 'Clinton courteously conveyed to Kim Jong Il an earnest request of the U.S. government to leniently pardon them and send them back home from a humanitarian point of view.' During the visit, Kim hosted a banquet in Clinton's honor, attended by the head of the North Korean State Security Department, U Tong Chuk. State media broadcast images showing a dour-looking Clinton and a smiling Kim. And the KCNA report summarizing the trip was remarkably positive, speaking of 'building the bilateral confidence' and 'improving the relations between the two countries.' Ling and Lee were in many ways pawns in a test of wills between North Korea and the United States. After their sentencing in June, North Korea reportedly kept them in a guest house near Pyongyang, allowing them to make occasional phone calls to relatives in the United States. The sentence to hard labor was not carried out. North Korea had long made it clear that it expected a high-profile visit on behalf of the reporters, but Gore may not have been acceptable because he was viewed as their boss and thus not an appropriate symbol of the United States. Other potential envoys considered by the administration included Senate Foreign Relations Committee Chairman John Kerry, D-Mass., New Mexico Democratic Gov. Bill Richardson and a former ambassador to South Korea, Donald Gregg. The discreet discussions to secure the women's release continued even as Hillary Clinton last month slammed North Korea for having 'no friends' and for acting like an unruly child. But in critical ways, she also moderated her tone about the case, moving from declaring in June that the charges were 'absolutely without merit or foundation' to saying last month that the reporters 'are deeply regretful, and we are very sorry it's happened.' Some officials believe the success of former president Clinton's trip could result in the first U.S.-North Korea bilateral meeting of the Obama administration. They also think the United States will have a somewhat stronger hand because China for the first time has backed tougher sanctions in the wake of North Korea's May nuclear test. No government officials appeared to be aboard Clinton's plane, but the nature of the delegation gave the mission a quasi-official status. It included John Podesta, who Clinton's his White House chief of staff, served as Obama's transition chief and is president of the Center for American Progress. Also seen in photos released by the Korean media were David Straub, former head of the Korea desk at the State Department, who is now at Stanford University; longtime Clinton aide Douglas Band; and Justin Cooper, who has worked with the William J. Clinton Foundation. It is not clear who funded the trip. News of Podesta's role came as a surprise to staffers at the Center for American Progress; he was believed to be on vacation in Truckee, Calif. Colleagues of Straub's at Stanford were also surprised. Clinton and his party were greeted early Tuesday at an airport in Pyongyang, the capital, by Yang Hyong Sop, vice president of the presidium of the Supreme People's Assembly, and by Vice Foreign Minister Kim Kye Gwan, according to KCNA. Kim is the chief nuclear negotiator for North Korea, suggesting that Pyongyang hoped to use the visit to make progress on the impasse over its nuclear weapons. The visit offered the United States its first direct look at the increasingly frail-looking Kim Jong Il, 67, who is thought to have suffered a stroke a year ago and whose health has triggered speculation that he has picked his third son to take over Asia's only communist dynasty. Special correspondent Stella Kim in Seoul, correspondent Blaine Harden in Seattle and staff writer Garance Franke-Ruta in Washington contributed to this report. 