By Kim Ghattas
BBC News, Washington
Bill Clinton's visit was a publicity coup for Kim Jong-il
It was a riveting combination of characters for a high-drama mercy mission, with all the trappings of a spy novel.
A charismatic former president flying across the Pacific to rescue two damsels in distress.
A meeting with a reclusive, enigmatic leader in a country mostly cut off from the rest of the world.
A high-profile American jetting off to solve one crisis, while his wife - the country's chief diplomat - embarked on her own mission abroad.
The Clinton mission to North Korea to secure the release of two captured US journalists - Laura Ling and Euna Lee - also provided a rare glimpse into the world of backchannel diplomacy, the making of a deal and a reminder of the role that former American presidents often play.
In a city where leaks to the media are the rule, everybody involved kept quiet about the trip, sometimes even after Bill Clinton landed, from the White House and State Department officials who helped negotiate and plan it, to the team of former administration officials and aides that eventually made the journey with Mr Clinton.
'Pensioner going shopping'
Hillary Clinton herself also kept mum - in fact, while the decision about her husband's departure was being finalised, around 25 July, she was involved in a war of words with the North Koreans.
Having described them as ''unruly children'' who cried for attention, she was described by Pyongyang as an ''unintelligent lady'' and a ''pensioner'' going shopping.
Although the White House insisted that Mr Clinton's trip was a private, humanitarian mission, the administration kept tight control of the negotiations.
US media reported that officials involved included National Security Advisor Gen James L Jones and the National Security Council's top expert on the region, Jeff Bader.
A US official also said that the North Koreans had given assurances before Mr Clinton left for Pyongyang that the two women would be released.
The US and North Korea do not have diplomatic relations but often communicate through channels at the UN and various intermediaries.
There are still conflicting versions of the course of events but it appears that the choice of Bill Clinton as an envoy was imposed by the North Koreans themselves.
They apparently told the two women journalists that this would help secure their release.
Ms Ling and Ms Lee relayed this to their families, who in turn notified the state department, through former Vice-President Al Gore.
A US official said President Barack Obama then asked Mr Clinton to undertake the mission.
Nearly an apology
After landing in Burbank, California, Ms Ling recounted how she and Ms Lee were told by their jailers they were going to a meeting and then walked into a room only to find their former president standing in front of them.
The two journalists had last month apologised, through a statement to their families, for crossing illegally into North Korea from China.
The next day Hillary Clinton repeated their message in a televised address - not quite an apology by Washington, but close enough to set in motion the process that eventually led to the release.
The Obama administration also denied reports by North Korean state media that Mr Clinton had apologised on behalf of the women. Officials also said no concessions were made to the North Koreans.
But for the reclusive regime and the ailing leader, always craving attention and recognition by Washington, the visit by a former American president who is also married to the current secretary of state, was in itself a kind of concession.
After all, they had rejected other suggestions for envoys and requested to deal with Mr Clinton.
The two journalists were surprised to find Mr Clinton waiting for them
The picture of Kim Jong-il, grinning as he sits next to a sombre-looking Mr Clinton, will also help the North Korean leader boost his image at home, amid reports he is ailing and preparing a power transition to his third son.
But an assessment was probably made that it was a concession Washington could afford since the Obama administration was not expending any of its own political capital, keeping a safe distance from the mission by despatching a former leader rather than a current official.
It is a decision that has drawn - perhaps expected - criticism from conservative circles.
John Bolton, ambassador to the UN during the Bush administration, said the Obama administration was rewarding North Korea for bad behaviour.
"Despite decades of bipartisan US rhetoric about not negotiating with terrorists for the release of hostages, it seems that the Obama administration not only chose to negotiate, but to send a former president to do so," he wrote in an opinion piece.
But the North Koreans were able to save face by releasing the journalists without appearing to be caving in to outside pressure.
While no-one expects a sudden breakthrough, officials are hoping Pyongyang will now also walk back on some of its recent announcements, such as its withdrawal from the "six-party talks" - the process by which the international community is attempting to persuade North Korea to drop its nuclear programme.
"Perhaps they will now be willing to start talking to us - within the context of the six-party talks - about the international desire to see them denuclearise," said Mrs Clinton on NBC.
President Obama also reiterated that North Korea had to give up its nuclear weapons if it wanted better ties with the outside world.
It is still unclear what Mr Kim and Mr Clinton discussed.
But the two men talked for three hours and it is likely that the nuclear file, which Mr Clinton knows well, came up.
This partly explains why Mr Clinton would have been keen to take on the challenge.
His administration oversaw a long thaw in ties with North Korea under the ''sunshine policy''.
In 1994, during the Clinton administration, Jimmy Carter went on a mission to Pyongyang, which resulted in breakthrough nuclear talks and in 2000, then Secretary of State Madeleine Albright visited Pyongyang.
President Clinton was hoping to visit as well before the end of his term but became embroiled in last-ditch peace efforts in the Middle East.
So if anything, Mr Clinton, the first high-level US official to meet Kim Jong-il for nine years, will have returned with a valuable assessment of the state of mind and state of health of Mr Kim, and perhaps some insight into the North Koreans' willingness to sit down for talks.
In an interview with MSNBC, President Obama said: "I suspect that President Clinton will have some interesting observations from his trip."
The US president also thanked Mr Clinton for his extraordinary humanitarian effort.
The mission has raised questions about what role the former president could play under the Obama administration.
State department spokesperson Robert Wood did not want to be drawn into speculation, pointing out only that Mr Clinton's involvement in this case was the result of specific circumstances.
But Michael Duffy, managing editor of Time magazine, who is currently writing a book, The Presidents Club, about the role of former presidents, said the ''relationship between a president and his predecessors is one that existed before and one that will continue".
Just as Mr Clinton himself had called on Mr Carter for certain missions, Mr Duffy expected that President Obama would call on Mr Clinton in the future as well, even if (or perhaps because) he is the husband of the Secretary of State.
Mr Clinton's wife was a factor that "complicated and simplified" things at the same time, Mr Duffy added.