In a speech at West Point last month, Obama outlined a new "light footprint" approach to fighting terrorist groups in the Muslim world, one that relies mostly on U.S.-supported local forces, not American troops.
The strategy, he explained, "expands our reach without sending forces that stretch our military thin or stir up local resentments."
The countries he had in mind, Obama said, were Yemen, Somalia, Libya, Mali and Syria. He barely even mentioned Iraq.
But now, thanks to the march toward Baghdad by ISIS, the Islamic State of Iraq and Syria, Obama's still-unfinished counter-terrorism strategy faces a real-world test sooner than anticipated.
Why is Obama, a president who won the White House by promising to get the United States out of Iraq, sending U.S. troops back in?
The president cited two principal reasons: the destabilizing effect of a civil war in a region that produces much of the world's oil, and the danger that ISIS could use territory it controls as a base for terrorism against the U.S.
But he put most of his emphasis on terrorism, and not only because that's a stronger selling point for war-weary American voters.
If there's an Obama Doctrine in foreign policy, it begins with one rule: no more large-scale military intervention. But the rule comes with a major exception: terrorism.
Obama withdrew U.S. troops from Iraq, is withdrawing from Afghanistan, and has repeatedly rejected proposals for using military force against the regime of Bashar Assad in Syria.
But he has shown no such hesitance when it comes to striking terrorists who have a history of plotting attacks against U.S. citizens. He presided over a massive increase in the U.S. drone war against extremist groups in northwest Pakistan, a similar battle against extremists in Yemen and a smaller campaign in Somalia.
Now he and his aides are laying the groundwork for possible U.S. airstrikes against ISIS in Iraq — and, they say, in Syria as well.
If ISIS establishes an extremist mini-state in the borderlands between those two countries, Obama warned last week, it could use it to target "our personnel overseas and eventually the homeland."
U.S. officials say they are particularly concerned that hundreds of foreigners, some with U.S. passports, have traveled to the Middle East to be trained by ISIS.
Even before ISIS launched its offensive in Iraq, U.S. officials had decided that airstrikes against the group's bases in Syria would be legal if the president concluded that they posed an "imminent threat" to Americans.
Such attacks could also have a welcome side effect on Syria's civil war, some officials argue, by weakening ISIS and strengthening more moderate rebels that the United States has haltingly supported.
Still, direct U.S. strikes against ISIS aren't imminent, officials say. First, they don't appear to be necessary to protect Baghdad, since the military situation around the Iraqi capital has stabilized.
Second, the U.S. military doesn't have the kind of detailed intelligence it needs before launching drone strikes, especially in areas where extremists are mingled with civilians. Moreover, ISIS is fighting in an alliance with some of Iraq's less-radical Sunni Muslim factions, and the administration doesn't want to alienate their followers by hitting them. Instead, it hopes to isolate ISIS from the others. (That's another reason strikes may be directed against ISIS' bases in the desert: less danger of collateral damage.)
U.S. officials don't use these words — at least not in public — but their strategy has a Plan A and a Plan B.
Plan A is to encourage Iraq's political factions to form a government more inclusive than the current one of Prime Minister Nouri Maliki, who has alienated Sunnis by barring them from government positions and persecuting their leaders. A broader government could become the "partner" that Obama's counter-terrorism strategy envisions, with an Iraqi army capable of shouldering the fight on the ground.
On Friday, Obama mentioned Yemen as a potential model for Iraq: a country where the United States has no combat troops but has launched an estimated 108 airstrikes since 2009 in support of a friendly government.
But if Plan A fails, there's still Plan B: a continuing, mostly diplomatic effort to stave off all-out civil war in Iraq, combined with selective airstrikes against ISIS.
Neither one is merely a short-term, emergency response to ISIS' march to the gates of Baghdad. Obama and his aides are planning a long-term effort to try to stabilize Iraq — or, failing that, at least to keep ISIS from growing stronger.
Most Americans — left, right and center — surely cringe at the thought of sending troops back into Iraq.
But while Obama's Republican critics have denounced him for past missteps, none of them has offered a good alternative for the present crisis.
The president has promised that this time will be different. His limited goals don't include the shining Arab democracy promised by George W. Bush, nor even the fully stabilized Iraq he once hoped for. And U.S. troops won't go into combat.
The results are certain to be messy, even if U.S. policy succeeds on every front (and it won't). But that's one hard-earned lesson from the last decade of U.S. foreign policy: If you want to stay off the slippery slope to deeper intervention, make sure to keep your ambitions modest.