President Obama on Wednesday unveiled his strategy to defeat the extremist group Islamic State "wherever they exist."
For a president who has prided himself on ending the war in Iraq, it is a problem with no easy solutions.
He must consider an American public that is wary of being drawn into another expensive overseas conflict, a skeptical Congress and the lack of an imminent threat to the United States. There are also deep divisions among Iraq's ethnic and religious groups to navigate, along with instability in the region and the competing interests of prospective partners in the Middle East.
Here is a look at how we got to this juncture and the hurdles that lie ahead.
What is Islamic State?
The militant group also known by the acronyms ISIS and ISIL is an Al Qaeda offshoot that has seized large swaths of territory in Iraq and Syria for its self-styled caliphate, or Islamic state. The militants espouse an especially harsh interpretation of Islam and have used brutal tactics, including mass shootings, beheadings and crucifixions, to impose their rule.
Why is the president addressing this issue now?
Islamic State's stunningly swift takeover of territory in Iraq's north and west pressured Obama into a bombing campaign this summer to protect U.S. personnel in the country and to avert what he described as a potential genocide of a besieged religious minority called the Yazidis.
Until now, the president had resisted getting drawn into the 3-year-old civil war in Syria and limited U.S. airstrikes to militant targets in Iraq. But Obama reconsidered his position as Islamic State grew stronger and began issuing threats against Americans.
Last month, he authorized military surveillance flights over Syria to gather intelligence on possible targets.
Pressure to expand the U.S. air campaign gained new urgency when videos surfaced in recent weeks of the extremists beheading two American journalists and other captives.
The militants' growth has been aided by revenue derived from oil and gas fields they control, as well as taxes, tolls, extortion, smuggling and kidnapping.
A sophisticated media campaign has drawn recruits from around the world, including hundreds of militants who are believed to be carrying Western passports, which could allow them to easily travel to the United States.
What do we know about Obama's plan?
The president said he will expand U.S. airstrikes against the militants in Iraq and and left open the option to bomb the group in neighboring Syria.
Obama hopes that the new government announced in Baghdad this week will be able to win over members of the Sunni Arab minority who have supported Islamic State because they feel marginalized and abused by the country's Shiite Muslim leadership.
He plans to provide further training and equipment to the Iraqi forces arrayed against the extremists and wants them to deploy collaboratively under Prime Minister Haider Abadi's government.
He has also stressed the importance of building partnerships with other nations in the Middle East and with Western allies who have been asked to help with the training, to gather intelligence and to counter Islamic State's appeal in the broader Muslim world.
What hurdles lie ahead?
Members of Iraq's Sunni and ethnic Kurdish minorities don't trust the Shiite Muslim-led military or the militias that have joined the fight against Islamic State and accuse them of pursuing a sectarian agenda.
There are also long-standing disputes between leaders in Baghdad and in the semiautonomous Kurdish region, whose peshmerga forces took over the contested oil hub of Kirkuk when government troops fled the Islamist assault in June.
Expanding U.S. airstrikes into Syria could put U.S. forces in the uncomfortable position of aiding the government of President Bashar Assad, which the U.S. wants to see replaced.
Further U.S. involvement also risks inflaming regional tensions.
Although the United States and Iran both back the government in Iraq, they are pursuing widely divergent goals. America's closest regional allies, Saudi Arabia and Israel, fear that any alliance to defeat the militants could weaken their strategic position against Iran, their top regional rival.
Saudi Arabia and other Sunni-led governments will also resist any strategy they believe could leave Sunnis vulnerable to Iranian-backed Shiite militias in Iraq.
In Syria, Iran has provided key support to Assad, whose brutal repression of a Sunni-led uprising has antagonized Sunni power brokers in the region.