President Barack Obama meets with leaders of the Progressive, Black, Hispanic and Asian Pacific Caucuses in the Roosevelt Room of the White House, Oct. 29, 2009. (Official White House Photo by Pete Souza)

This official White House photograph is being made available only for publication by news organizations and/or for personal use printing by the subject(s) of the photograph. The photograph may not be manipulated in any way and may not be used in commercial or political materials, advertisements, emails, products, promotions that in any way suggests approval or endorsement of the President, the First Family, or the White House.

When President Barack Obama took office in 2008, he had campaigned on ending the war in Iraq and keeping the U.S. out of new military conflicts.

But Obama now finds himself exactly where he didn’t want to be: trying to defeat a brutal terrorist group in Iraq and Syria without dragging America into a prolonged regional conflict.

How did we get here?

In Obama at War, premiering Tuesday, May 26, FRONTLINE correspondent Martin Smith examines the Obama administration’s struggle to deal with the deadly civil war in Syria, now in its fifth year — and explores how the accompanying rise of ISIS has raised the stakes.

Drawing on interviews with key military and diplomatic leaders, Obama at War is an intense look at the heated debates within the administration about when and how to get involved in Syria.

Obama at War traces Obama’s Syria policy from the Arab Spring in 2011 onward, revealing an administration struggling to identify reliable partners on the ground, mindful of the American public’s war-weariness, and divided over whether to provide military aid to “moderate” rebels.

The documentary also explores how the spiraling humanitarian catastrophe under Assad allowed ISIS to flourish.

With more than half the people in Syria displaced from their homes, ISIS continuing to seize and hold territory in Iraq and Syria, and the administration mulling its next move, Obama at War is an inside look at the administration’s biggest foreign policy challenge.