WASHINGTON — President Barack Obama vowed “justice will be done” against the Islamic State killers of American journalist James Foley on Tuesday as the United States sought to identify targets for potential airstrikes in Syria.

Obama’s tough talk followed his decision to approve U.S. surveillance flights to gather intelligence on Islamic State units in Syria should he decide to order airstrikes in the country, which has been embroiled in a three-year civil war.

“America does not forget. Our reach is long. We are patient. Justice will be done,” Obama told veterans gathered at a convention of the American Legion in Charlotte, North Carolina.

Obama, who ordered airstrikes against the militant group’s fighters in Iraq and is considering extending them across the border into Syria, said he would do whatever was necessary to go after those who harm Americans.

“Rooting out a cancer like ISIL won’t be easy and it won’t be quick,” he said. ISIL is the acronym the United States uses for Islamic State, an offshoot of al-Qaida which has declared a caliphate in a large swath of territory in Syria and Iraq.

Obama returned to the White House later and met with Secretary of State John Kerry and Vice President Joe Biden. Islamic State was on the agenda for their talks.

U.S. officials elaborated on their case for why the group posed a national security threat, saying foreigners from Western countries who are fighting for Islamic State could later return to their home countries and launch attacks against civilians.

“If left unchecked, the group could one day pose a more direct threat to the U.S. homeland and other countries beyond the region,” said deputy White House press secretary Shawn Turner.

Launching airstrikes into Syria would add an unpredictable element to a civil war that Obama has taken great pains to stay out of. A year ago he stepped back from attacking the government of Syrian President Bashir al-Assad for using chemical weapons on his own people.

Finding Islamic State targets inside Syria would be a daunting task given the difficulty of gathering intelligence on the locations of the militants. A key area of focus was believed to be the northern city of Raqqa, the group’s Syrian stronghold.

Analysts said the United States was scrambling to gather intelligence.

Tom Sanderson, a counter-terrorism expert at the Center for Strategic and International Studies in Washington, said aerial intelligence was not enough. U.S. officials would need on-the-ground forward spotters, and moderate Syrian rebels backed by the United States may not be sufficient.

“Hitting them in open areas is better. Once they are in urban areas you need exceptionally good intelligence,” he said. “We need good intelligence and you can’t get good intelligence from untrustworthy sources.”

White House spokesman Josh Earnest said there was no plan to coordinate with the Syrian government on how to counter the threat from Islamic State. Syria has appealed for coordination.

“As a matter of U.S. policy we have not recognized the Assad regime as the leader of Syria. There are no plans to change that policy and there are no plans to coordinate with the Assad regime as we consider this terror threat,” he said.

Obama’s actions followed the release of a graphic video last week showing the beheading of Foley by Islamic State fighters. A decision to launch airstrikes in Syria did not appear to be imminent.

Earnest said the crisis in the region caused by Islamic State’s rapid advance could not be solved by U.S. military power alone and would require the involvement of other countries.

Gen. Martin Dempsey, chairman of the Joint Chiefs of Staff, said last week that Islamic State would eventually need to be addressed on “both sides of what is essentially at this point a non-existent border” between Syria and Iraq.

Dempsey’s spokesman confirmed Monday that options against Islamic State were under review and stressed the need to form “a coalition of capable regional and European partners.”

He said Dempsey was working with U.S. Central Command, which is responsible for American forces in the Middle East, to prepare options to address Islamic State in both Iraq and Syria “with a variety of military tools, including airstrikes.”