For several days this week, President Trump had a new header photo on Twitter. A page that has depicted him signing executive orders, meeting heads of state and military brass, and surrounded by championship sports teams showed him welcoming home three Americans who had been held in prisons in North Korea. On May 10th, at 3 A.M., the President and the First Lady, accompanied by Vice-President Mike Pence and his wife, Karen, were at Joint Base Andrews, outside Washington, D.C., to greet the men when their plane touched down. With spotlights blazing, a huge American flag hanging in the background, and cable-news networks watching, the Trumps boarded the jet and emerged minutes later with the visibly ecstatic former captives.

Kim Dong-chul, a sixty-four-year-old businessman, survived more than two years in a North Korean prison, longer than any other American, after being accused of espionage and sentenced to ten years’ hard labor. Tony Kim, an accounting professor at Pyongyang University of Science and Technology, was arrested last April, while boarding a flight, and was accused of trying to overthrow the North Korean government. Kim Hak-song, an agricultural professor at the same university, who hoped to ease North Korea’s chronic food shortages and malnutrition, was arrested two weeks later and was also accused of trying to topple the regime.

After the men had exited the plane, waving victory signs, Trump walked them across the tarmac to a group of reporters and television crews. Calling the freed captives “incredible people,” Trump said, “Frankly, we didn’t think this was going to happen, and it did.” After answering reporters’ questions, the President joked that the event had just broken “the all-time-in-history television rating for three o’clock in the morning.” Later that day, the White House released a press release with the heading, “WHAT YOU NEED TO KNOW ABOUT THE PRESIDENT’S VICTORY FOR THE WORLD BY FREEING THREE BRAVE AMERICANS.”

Trump’s decision to journey to Andrews in the middle of the night to greet the three men was unusual; previous Presidents have welcomed returning captives and prisoners, but usually at the White House or in private meetings. Since Trump took office, White House officials have told me that the President is personally and passionately committed to freeing Americans held overseas. Celebrating their homecoming on live television, however, raises the question of whether he is using their release for political gain.

I asked former captives and the family members of former hostages this week for their reactions to Trump’s early-morning welcome of the prisoners from North Korea. They all expressed a mix of appreciation and trepidation. “It’s terrific news anytime hostages go free, but I’m skeptical when a President wants to take loads of credit,” Michael Scott Moore, a journalist who was held captive for two and a half years, in Somalia, told me. “Hostage cases are usually more complicated than that.” Another former hostage told me, “I thought, What a show-off, but I understood. It was good politics, taking credit for bringing the hostages home. I was happy for the men, and saw the happiness, the relief, and the joy in their faces.” A third was relieved but also concerned that, by publicly touting the return of Americans held overseas, Trump had signalled to both militants and hostile governments that American captives are valuable bargaining chips to this President. “I thought to myself, This sends all the wrong messages to those guys,” he told me.

Last week was not the first time that Trump welcomed freed prisoners home in front of the cameras. In April of 2017, Trump invited Aya Hijazi, a thirty-year-old American aid worker, to the Oval Office, after Administration officials had helped broker her release, along with that of her husband and four other aid workers, from Egypt. In charges that U.S. officials and human-rights groups said were false, prosecutors had accused Hijazi and her husband, an Egyptian who ran a shelter for Cairo street children, of engaging in child abuse and trafficking. Little evidence was presented against them, and they were held, without trial, for three years. Former U.S. diplomats told me that the release of Hijazi was a “fig leaf” that Abdel Fattah El-Sisi, Egypt’s authoritarian President, gave Trump after he invited Sisi to the Oval Office and made no mention of Sisi’s widespread human-rights abuses. After the release of Hijazi, Sisi intensified a crackdown on journalists and aid groups in advance of the Presidential election there.

In October, 2017, during a speech about tax reform, Trump claimed that a Pakistani military operation that had freed an American woman, her Canadian husband, and their two children from five years in Taliban captivity was a sign of Pakistan’s increased respect for the U.S. since he took office. “A country that totally disrespected us called with some very, very important news,” Trump said. “And one of my generals came in, they said, ‘You know, I have to tell you, a year ago they would have never done that.’ ” U.S. intelligence officials said that a tip they gave the Pakistanis regarding the captives’ location—and a threat to carry out an American military raid—sparked the operation that freed the family.

Former captives also noted the inconsistency of Trump’s approach. While he freed the prisoners in North Korea, his other foreign-policy decisions are complicating matters for some of the other people he wants to save. Forty-eight hours before he welcomed the Americans freed from North Korea, Trump had pulled the United States out of the Iran nuclear agreement, an act that may mean that seven American citizens and green-card holders currently jailed in Iran—Robert Levinson; Nizar Zakka; Xiyue Wang; Baqer Namazi and his son Siamak; and Karan Vafadari and his wife, Afarin Nayssari—will be held for months and, perhaps, years longer.

Similarly, last month, the air strikes that Trump ordered against Syria, in retaliation for a chemical-weapons attack, may have prolonged the six-year captivity of Austin Tice, an American journalist who is believed to be held by the Assad regime. Trump has also declined to hold peace talks with the Taliban, a group that has been holding captive two Americans, Paul Overby and Kevin King, for the past two years. (The same Taliban faction held me captive for seven months, in 2008 and 2009.)

In other cases, Trump has proved temperamental. Last November, he boasted of having helped free three U.C.L.A. basketball players who were accused of shoplifting sunglasses in a Louis Vuitton shop in Hangzhou, China. After LaVar Ball, the father of one of the players, declined to thank him, the President tweeted that he “should have left them in jail” and called Ball an “ungrateful fool” and a “poor man’s version of Don King, but without the hair.”

Freeing Americans imprisoned overseas has long vexed Presidents. The United States has a policy of not making concessions or paying ransoms in return for captives—as some European nations are believed to do. Balancing the long-term interests of the nation as a whole against individual cases has proved excruciatingly difficult, as Jimmy Carter, in particular, learned during the Iran hostage crisis. It has not become any easier: since 9/11, militants have kidnapped American civilians and, in the case of the Islamic State, brutalized them.

Diane Foley, whose son James, a journalist, was murdered by ISIS, in 2014, established the James W. Foley Legacy Foundation, which advocates for hostages and press freedom. Foley and other relatives of former captives, including my wife, also founded a nonprofit group, Hostage US, to advise and support families during kidnappings. Foley credited Trump, who has made it a practice to reverse President Barack Obama’s initiatives, for keeping in place a “Hostage Recovery Fusion Cell” that Obama established, in 2015, to strengthen efforts to bring captives home. Foley also said that she felt that the Trump Administration is more willing to take risks, or to bargain, for the return of hostages than the Obama Administration was: “I think they see the return of Americans detained abroad as a win.” What drives Trump to so publicly celebrate the return of captives is difficult to know. The President certainly deserves credit for Americans’ safe return. One hopes that he sees them as more than wins.