President Barack Obama has resisted the pull of potential U.S. military action in Syria for three years.

He has held firm even as the civil war's death toll climbed toward 200,000, the Syrian government used chemical weapons against civilians and Islamic State militants strengthened amid the chaos.

Now Obama must decide whether the extremist group's murder of American journalist James Foley, as well as the broader threat the group could pose to U.S. interests, should change his cautious calculus.

Pressure is coming from his own military leaders to go after the Islamic State inside Syria. But he must weigh that against his aversion to the risks that could come with plunging the United States into a country torn apart by an intractable internal conflict.

White House officials have suggested that airstrikes in Syria are an option, though the officials say specific military proposals has not yet been presented to the president.

"We're actively considering what's going to be necessary to deal with that threat, and we're not going to be restricted by borders," said Ben Rhodes, Obama's deputy national security adviser. "We've shown time and again that if there's a counterterrorism threat, we'll take direct action against that threat, if necessary."

Even before Foley's murder, Obama found himself on far different footing in the Middle East than he probably expected in the sixth year of his presidency.

After running for the White House on a pledge to end the Iraq war and then making good on that promise in late 2011, Obama thrust the U.S. military back into Iraq this month with a limited airstrike campaign against Islamic State targets.

Obama has said he will not send U.S. combat troops to another ground war in the Mideast. But expanding the airstrikes in Iraq and broadening them to includeSyria could mean a lengthy American military commitment in the region that could consume much of Obama's remaining time in office.

"What we should have learned over the past dozen years in that part of the world is that the use of military power is very unpredictable," said Stephen Walt, a professor of international affairs at Harvard's John F. Kennedy School of Government.

That may be particularly true in Syria, where President Bashar Assad's government is warring with opposition forces. Unlike in Iraq, the battle lines are more clearly drawn. Syria has a host of military players in close proximity to each other, including the Islamic State, the al-Qaida-linked Nusra Front, mainstream Western-backed rebels and pro-government forces.

The Islamic State is among the groups fighting Assad, meaning a U.S. campaign to weaken the extremists could actually strengthen a leader the White House has sought to push from office.

Obama could try to counteract that uncomfortable dynamic by also taking strikes against Assad, though that could put the U.S. on the hook for the kind of long-term commitment to rebuilding Syria that he has tried to avoid.

The risks are no less troubling if Obama allows the Islamic State to continue having unfettered access to a safe haven in Syria. Politically, it could bolster the argument from his critics that he is overseeing an American retreat on the world stage. It also could give the militants space to strengthen and become a threat not just to U.S. interests in the region, but also to the U.S. at home.

Obama's own military leadership made clear in recent days that the threat from the Islamic State cannot be fully eliminated without going after the group inSyria, as well as Iraq.

"This is an organization that has an apocalyptic, end-of-days strategic vision and which will eventually have to be defeated," said Army Gen. Martin Dempsey, the chairman of the Joint Chiefs of Staff. "Can they be defeated without addressing that part of their organization which resides in Syria? The answer is no. That will have to be addressed on both sides of what is essentially at this point a nonexistent border."

To White House critics, the unappetizing options are the result of Obama's own foreign policy missteps. They argue that he gave extremists an opening in Iraq by not doing more to reach an agreement with the Iraqi government to leave U.S. forces in the country after 2011. They say his decision to not provide heavy weaponry to more moderate rebel groups in Syria also helped facilitate the Islamic State's rise.

Without a course correction, Obama's critics argue, the U.S. will be at greater risk.

"If we do not do more to assist our Iraqi partners and those moderate Syrians who are fighting ISIL and directly target ISIL's leadership and networks in Iraq and Syria, I fear that James Foley will not be the only American to die at their hands," said Sen. Marco Rubio, using one of the acronyms for the Islamic State.

Obama's advisers say the responsibility for stemming the rise of the Islamic State does not rest solely with the United States. The White House has been imploring Sunni states in the region — Saudi Arabia, Jordan and the United Arab Emirates in particular — to wield their influence with tribal leaders in Iraq and get them to push the Islamic State out of areas they have occupied.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

The U.S. also has been discussing ways that allies such as Britain, France, Australia and Canada can become involved through intelligence sharing, military assistance for Kurdish forces in Iraq and moderate opposition forces in Syria, and if necessary, joining the U.S. in military action.

Associated Press writers Zeina Karam in Beirut and Jim Kuhnhenn in Edgartown, Massachusetts, contributed to this report.