North Korea’s government rarely does anything for free. Aid agencies working in the country are routinely asked to contribute expensive trucks and equipment. In 2005, the Pentagon suspended a search for the remains of U.S. soldiers declared missing in action during the Korean War after the North Koreans demanded millions of dollars in return for their coöperation (which led to the program being nicknamed Bones for Bucks). After a historic summit in 2000 between South Korean President Kim Dae-jung and the North’s Kim Jong-il, for which Kim Dae-jung won the Nobel Peace Prize, it was revealed that South Korea had paid five hundred million dollars to secure the meeting.

So the seemingly unilateral release, this past weekend, of Kenneth Bae, a forty-six-year-old Korean-American missionary who was detained for more than two years, and Matthew Todd Miller, a twenty-four-year-old man who was arrested in April while on a private tour, raises some questions: What did the North Koreans hope to gain? Was the release simply a bold gesture signalling that North Korea wants to open a dialogue with the United States?

It might just be the latter. Since the death of Kim Jong-il three years ago, North Korea has been led by his youngest son, Kim Jong-un, who is thirty-one years old and was educated for a few years in Switzerland. The younger Kim has proven to have a penchant for the theatrical. Last year, with great fanfare, he had his own uncle, Jang Song-taek, executed as a traitor. He enjoys chumming around with Dennis Rodman, and seems to pride himself on being unpredictable.

The charges against the two Americans were indeed serious in the eyes of the North Korean regime. Bae, the longest-serving detainee, had been charged with attempting to overthrow the government by proselytizing. Miller had been arrested after tearing up his passport, an act the North Koreans alleged was part of a plan to investigate conditions in the country’s prison camps. Another American, Jeffrey Fowle, was released unconditionally in October, after spending six months in detention for leaving a Bible in the northern city of Chongjin. The North Korean government hates Christian missionaries—several defectors have told me that penalties are more severe for possessing a Bible than for having hard-core pornography, religion being the greater affront to a ruling ideology that lends the Kim family near-divine status.

To the North Korean government, the American prisoners were potentially useful as bargaining chips in its quest for recognition from the United States. Fowle said on Voice of America last week that he had, while in Pyongyang, been coached to sound pathetic in an official interview conducted with him in September by CNN and the Associated Press, in order to prod the U.S. government into sending a former President to secure the prisoners’ freedom. (Bill Clinton went to Pyongyang in 2009 to bring home the journalists Laura Ling and Euna Lee; Jimmy Carter brought home Aijalon Gomes in 2010.) “The main thing was to get me to talk about my desperate situation to get things going on this side of the Pacific,” Fowle said.

Instead of a former President, North Korea got James Clapper, the director of national intelligence. He was a good choice—sufficiently senior and preternaturally discreet. The Obama Administration had wanted to avoid sending a diplomat, or anyone associated with policymaking, lest it be seen as engaging in dialogue. When he arrived in Pyongyang last week, Clapper carried with him what a senior Administration official described to reporters as a “brief letter” stating that he was travelling as the “President’s personal envoy, with the expressed purpose of bringing these two Americans home.” Clapper did not meet with Kim Jong-un, but there was little doubt that Kim had been personally involved in the release; the North Korean government said in a statement that it was ordered by the first chairman of North Korea’s National Defense Commission, one of several titles that Kim holds.

In the past, the North Koreans have requested and received money in exchange for the release of foreign detainees, ostensibly to cover accommodations during their involuntary confinement. Brian Hale, a spokesman for Clapper, said that he was unaware of whether money had been paid in these latest cases. Speaking on Monday in Beijing, where he was attending the Asia-Pacific Economic Cooperation Summit, Obama downplayed the suggestion that Clapper’s mission held broader significance. “It did not touch on some of the broader issues that have been the source of primary concern when it comes to North Korea—in particular, its development of nuclear capacity,” the President told reporters. “There were not high-level policy discussions between Jim Clapper and the North Koreans.”

Kim Jong-un has had a tense relationship with the Obama Administration since Kim’s first months as leader, when he scuttled a generous U.S. offer of food assistance, which North Korea badly needed, by ordering a satellite launch just as the deal was about to be signed. Then, in 2013, North Korea conducted an underground nuclear-weapons test, and made a series of bombastic, though still scary, threats to launch a nuclear strike on the United States. North Korea has continued to work on its long-range-missile and nuclear programs since then, but its leaders haven’t been quite as provocative in recent months. Instead, they’ve been trying a new tack: public relations.

In September, the North Korean Foreign Minister Ri Su-yong became the first senior official from the country to address the U.N. General Assembly in fifteen years. Then, on October 4th, a delegation headed by Hwang Pyong-so, the de-facto second-in-command, arrived in Incheon to attend the closing ceremonies of the Asian Games. They were the highest-ranking North Koreans to visit South Korea in more than five years. Two weeks later, North Korea’s Ambassador to the United Nations, Jang Il-hun, participated in a question-and-answer session in front of the Council on Foreign Relations, where he boasted about his country’s improvements in human rights.

“Every day we witness … the further development of my society, thus leading the promotion and protection of human rights,” Jang said. “Can I just mention a few … ski resort, horse track, pleasure parks all over the country.” He also denied the existence of political prison camps in his country, despite extensive satellite evidence and defector testimony to the contrary.

North Korea’s public-relations campaign has been directed against a scathing report, released last February, by the U.N.’s Commission of Inquiry on Human Rights in North Korea, which called the country a “totalitarian state that does not have any parallel in the contemporary world.” The European Union and Japan have sponsored a resolution calling for North Korea’s leadership to be held personally accountable before the International Criminal Court in the Hague. The resolution could be approved by a U.N. committee dealing with human rights as early as next week, before coming up for a vote by the General Assembly in December.

The unilateral release of the American prisoners may well have been another line of defense against the threat of criminal charges. Although it is unlikely that Kim Jong-un would ever stand trial in the Hague, he would also not relish the prospect of living out his days as an international pariah, unable to travel the world. Kim is still in his thirties, and he had at least a taste of the outside world when he was schooled as child in Switzerland; his father rarely left North Korea, and then only in an armored railroad car, reportedly because he was afraid to fly.