President Obama said Wednesday that the world is "appalled by the brutal murder" of journalist James Foley, who American authorities Wednesday determined was beheaded in a video released by Islamic militants.

Obama, speaking during his vacation on Martha's Vineyard, denounced the killing and said the U.S. will "do what's necessary to see that justice is done."

The president said Foley was "taken from us in an act of violence that shocks the conscience  of the entire world." Obama said he spoke with Foley's family Wednesday and told them that "we are all heartbroken at their loss."

A visibly angry Obama said that Foley's life of bearing witness to conflicts around the world stands "in stark contrast" to ISIL, which the president said has "rampaged" across the Middle East, murdering both Sunni and Shia Muslims and targeting Christians and minorities.

"The fact is, they terrorize their neighbors," Obama said, adding later: "There has to be a common effort to extract this cancer so it doesn’t spread."

Obama authorized airstrikes in Iraq against Islamic State militants earlier this month in what the president said was an attempt to protect American interests in the country and aid a humanitarian mission to help fleeing members of the minority Yazidi sect who were trapped on a mountain. Iraqi forces, aided by U.S. air support, recaptured the crucial Mosul Dam from the group Monday.

"ISIL has no ideology of any value to human beings. Their ideology is bankrupt," Obama said Wednesday, adding: "One thing we can all agree on is that a group like ISIL has no place in the 21st century."

"...The United States of America will continue to do what we must do to protect our people. We will be vigilant and we will be relentless," Obama said. "When people harm Americans anywhere, we do what’s necessary to see that justice is done and we act against ISIL, standing alongside others."

Foley, 40, was captured by militants while reporting in Syria two years ago. Obama said Syrians "do not deserve to live under the shadow of a tyrant or terrorists," and have America's support to achieve a "future rooted in dignity."