Kneeling in the dirt in a desert somewhere in the Middle East, James Foley lost his life this week at the hands of the Islamic State in Iraq and Syria. Before pulling out the knife used to decapitate him, his masked executioner explained that he was killing the 40-year-old American journalist in retaliation for the recent United States’ airstrikes against the terrorist group in Iraq.

In fact, until recently, ISIS had a very different list of demands for Mr. Foley: The group pressed the United States to provide a multimillion-dollar ransom for his release, according to a representative of his family and a former hostage held alongside him. The United States — unlike several European countries that have funneled millions to the terror group to spare the lives of their citizens — refused to pay.

The issue of how to deal with ISIS, which like many terror groups now routinely trades captives for large cash payments, is acute for the Obama administration because Mr. Foley was not the lone American in its custody. ISIS is threatening to kill at least three others it holds if its demands remain unmet, The New York Times has confirmed through interviews with recently released prisoners, family members of the victims and mediators attempting to win their freedom.

Sensitive to growing criticism that it had not done enough, the White House on Wednesday revealed that a United States Special Operations team tried and failed to rescue Mr. Foley — a New Hampshire native who disappeared in Syria on Nov. 22, 2012 — as well as the other American hostages during a secret mission this summer. Mr. Obama said the United States would not retreat until it had eliminated the “cancer” of ISIS from the Middle East.