Now he's launching a long-term operation against fighters from the Islamic State of Iraq and the Levant in two countries, Iraq and Syria. A number of nations, including Canada, are offering varying levels of support.
How did we get here?
— December 2011: Making good on a campaign promise, Obama toasts the withdrawal of American troops from Iraq.
In a ceremony with soldiers, he says: "Iraq is not a perfect place. It has many challenges ahead. But we're leaving behind a sovereign, stable and self-reliant Iraq... The war in Iraq will soon belong to history. Your service belongs to the ages."
—Summer 2012: The president refuses to get drawn into Syria's civil war after having been pulled into Libya's.
This is against the advice of more hawkish members of his own cabinet, including Secretary of State Hillary Clinton. They urge him to work with the moderate rebels opposing the Assad regime.
"No one likes to lose a debate, including me," Clinton later wrote. "In this case, my position didn't prevail."
—August 21, 2012: Obama draws a "red line" for Assad. He says he could get involved in Syria if he sees chemical weapons being used in the conflict.
—Spring 2013: Evidence of atrocities against civilians begins to emerge in Syria, including use of chemical weapons.
—August 2013: Obama announces the possibility of "limited airstrikes" against Assad.
U.S. public opinion is massively against it. Obama asks Congress for a vote on the issue, but both the administration and lawmakers retreat in the face of public hostility.
—December 2013: Nearly 700 people have been killed amid infighting between Syrian rebel groups. ISIL increasingly dominates the opposition.
—Jan. 3, 2014: Flush with foreign fighters, cash, and control of a swath of eastern Syria, ISIL rebels grab control of the Iraqi cities of Fallujah and Ramadi, and promise to protect Sunnis from the Shia-dominated government in Baghdad.
Obama plays down the threat. In a now-notorious quote, he uses a basketball analogy to argue that these rebels are no al-Qaida: "If a (junior varsity) team puts on Lakers uniforms, that doesn’t make them Kobe Bryant,” he tells the New Yorker.
—June 2014: ISIL seizes control of Mosul, Iraq's second-biggest city. Iraqi soldiers flee, leaving behind valuable U.S.-supplied equipment. Minority groups report massacres and other atrocities.
—June 19: The American military is back in Iraq. Obama sends 300 American military advisers into Iraq, to help plan possible airstrikes. He calls on the Iraqi government to be more inclusive of Sunnis. And he promises that this won't be like the 2003 invasion: "I think we always have to guard against mission creep... So let me repeat what I've said in the past: American combat troops are not going to be fighting in Iraq again."
—Aug. 7: Obama authorizes airstrikes. They will be limited to areas where the U.S. has interests, like the oil-rich Kurdish region, and areas where minority groups face a critical threat, including stranded Yazidi people on Mount Sinjar.
—Aug. 10: Canada announces an additional $5 million in humanitarian aid for stranded Iraqis, and has spent $16 million in the country since the beginning of the year.
—Aug. 19: ISIL releases the first of two gruesome videos that purport to show American journalists being beheaded. They're said to be retaliation for U.S. airstrikes that have, according to Western intelligence, reversed the group's momentum. A rebel with a British accent narrates the shocking video, prompting a debate in the U.K. about how to deal with foreign fighters.
—September: Public-opinion polls show an shift in U.S. public opinion, in favour of military action. Multiple surveys show widespread support for airstrikes in Iraq and also Syria, but not for a ground combat mission.
—Sept. 3: Obama sends 350 more military personnel to protect American facilities and workers in Iraq. They will not have a combat role. He denies reports that a Syria operation is imminent: "We don't have a strategy yet."
—Sept. 5: Canada sends in a reported 100 special-operations soldiers into Iraq, to play an advisory role that will be reviewed after 30 days.
—Sept. 10: Obama drastically expands the fight against ISIL. He does not use the word "war" — but he says airstrikes will spread to Syria, and a U.S.-led coalition will hit terrorists "wherever they are." He says he'll chair a UN Security Council meeting on foreign fighters. Although he doesn't seek congressional authorization for the airstrikes, he asks lawmakers for funds to train moderate Syrian rebels. Obama repeats that there will be no ground combat mission.
Prime Minister Stephen Harper's office says Canada is united with the fight against "this barbaric terrorist threat." It says it still plans to review the military presence after 30 days. But Canada has no plans to deploy any military assets to Syria.