President Obama pledged Tuesday that the Islamic State of Iraq and Syria would pay the price for the beheading of an American journalist but also warned against military overreach as he faces calls for a broader campaign of airstrikes in the Middle East.

"America does not forget. Our reach is long. We are patient. Justice will be done,” Obama said at the American Legion National Convention in Charlotte, N.C., vowing accountability for the beheading of U.S. journalist James Foley.

Obama authorized military action against ISIS militants in Iraq, and Pentagon officials recently began surveillance work in Syria, laying the foundation for possible airstrikes there.

The White House says Obama hasn’t decided whether to pursue airstrikes in Syria, but senior officials have hinted that the president doesn’t believe he needs congressional approval to do so.

The president on Tuesday defended the U.S. bombing campaign in Iraq, however, and reiterated that American combat troops would not be deployed there.

The president is simultaneously trying to halt ISIS gains in Iraq and Syria while not alienating liberals wary of mission creep in the region.

“History teaches us of the dangers of overreaching, of spreading ourselves too thin, and trying to go it alone without international support or rushing into military adventures without thinking through the consequences, ” Obama told the roomful of veterans.

“We’ll continue to take direct action where needed to protect our people and to defend our homeland,” he added. “Rooting out a cancer like [ISIS] won’t be easy and it won’t be quick. But tyrants and murderers before them should recognize that kind of hateful vision ultimately is no match for the strength and hopes of people who stand together.”