President Obama came into office promising to turn the page on a chapter of American history defined by two wars in the greater Middle East. His consistency in delivering on that promise is admirable, as is the focus with which he has learned from and sought to avoid his predecessor’s mistakes regarding the use of American force abroad.

Ironically, however, Obama’s fixation on closing one chapter led him to decisions that opened a new one that reads very similarly. This new war on ISIS—Obama’s war—which began in August 2014, can be traced to two errors of judgment. Jeffrey Goldberg’s article on “The Obama Doctrine” reveals that these errors were driven by the president's determination to keep his promises to the American people and to avoid the mistakes of the past.

The first mistake was Obama’s retreat from Iraq—the withdrawal not just of U.S. forces, but even more so of diplomatic energy and leverage, which, successfully deployed, might have mitigated the collapse of the Iraqi political experiment and thus blunted the rise of ISIS. After Iraq held its (pre-American withdrawal) elections in 2010, the Obama administration took a hands-off approach to Iraqi domestic politics, and it failed to replace the American military presence with a robust set of civilian, economic, and other partnerships to sustain American influence. In 2011, my last of about two years working on Middle East policy in Obama’s State Department, we were planning for sharp cuts in civilian programs for Iraq alongside the military drawdown—and over the next two years, U.S. economic aid to Iraq dropped nearly 50 percent. The administration had ample warning about the damage Iraqi Prime Minister Nouri al-Maliki’s sectarian and power-hungry behavior was having on Iraqi security and stability. But the president and Vice President Biden, who managed the Iraq portfolio on Obama’s behalf, chose to do very little to constrain Maliki as he began to unravel the tentative political bargains between Sunnis, Shiites, and Kurds within federal Iraq.

America’s regional partners decried the rise of Iranian influence as the United States stepped back, and feared Maliki’s steps against Sunni politicians could reignite civil violence, but the White House brushed off their concerns in both Iraq and Syria. And so the Gulf states sent their own support to Sunni tribes in western Iraq and militias battling Assad in Syria, stoking the sectarian flames and setting the stage for extremists to outbid them. As ISIS began to gain ground among Sunni populations alienated from the central government, the administration didn’t see any reason to invest in persuading Maliki toward a political accommodation that might have tamped down the emergent Iraqi Sunni militias and held Iraq together. That’s not to say Obama would have succeeded—but because he wanted to turn the page on the Iraq experience, he failed to try.

Likewise, Obama’s read of the Syrian conflict as holding only narrow implications for American interests was a signal failure to learn the lessons of the 1990s and recognize the risk that Syria’s civil war could spill over in ways that directly implicated U.S. interests. It did not, in 2012 and 2013, require special foresight to apply to the Syrian case other lessons from history than those Obama focused on. The experience of the 1990s clearly suggested how a neglected civil war offered easy opportunities for a violent jihadist movement—just as the Afghanistan war did for the Taliban in the mid-1990s—and how large-scale refugee flows would destabilize Syria’s neighbors, including key U.S. security partners like Jordan and Turkey. And as we now know, ISIS used the security and governance vacuums created by the Syrian Civil War to consolidate a territorial and financial base that the United States has been seeking since late 2014, with limited success, to undermine.

These two errors of understanding and judgment, both driven by the president’s commitment to avoid his predecessor’s mistakes, left major risks to regional stability unaddressed, and thus fed the rise of an ISIS threat so significant as to compel Obama, in August 2014, to overturn his longstanding preferences and recommit American blood and treasure to fighting Islamist extremists on the ground in Iraq, and now in Syria. His errors (as well as the famous “red line” climbdown) also provoked anxious regional partners to take their own initiatives to advance interests they felt Obama had slighted—condoning jihadism at times along the way, and very often exacerbating the disorder and sectarianism on which ISIS feeds.

Obama feared a slippery slope going up against Bashar al-Assad in Syria—but the war against ISIS is the slipperiest slope of them all. In just under two years, the administration has moved from airstrikes, to 475 additional military advisers in Iraq, to over 4,000 troops on the ground including U.S. special-operations forces in both Iraq and Syria. At the same time, the metastasizing threat from ISIS is forcing Obama to order limited military strikes in Libya, consider plans for further military intervention there, and build up military commitments to the Sunni Arab states of the Persian Gulf—the latter two steps, if Goldberg’s piece is accurate, against his own inclinations. An American president who, in May 2013, rejected the notion of a “global war on terror” has now launched one.

Meanwhile, the wide gulf between Obama's fixation on defeating ISIS, and his regional partners’ focus on pushing back Iran and Assad, means that America finds itself with too few partners to share the burden of this battle, which U.S. generals now call a "generational struggle.” America’s regional friends are acting to defend their own interests, not always in ways congruent with American interests. Obama’s apparent inability to see the conflicts between his Syria policy and his ISIS policy, and his reticence to do the sustained work necessary to hash out common priorities with the Gulf Arabs, Turkey, and Israel, have generated a problem more costly and harder to solve than the free-rider problems he complains of. The price is visible in, for example, Obama’s wordless facilitation of Saudi Arabia’s war in Yemen—which, ironically again, has given al-Qaeda in the Arabian Peninsula its most congenial working environment in years.

Finally, Obama’s actions—his reticence to push Maliki, his dithering over Abdel Fattah el-Sisi’s 2013 military coup in Egypt, and now his reversion to uncritical security partnerships with Gulf states in the name of fighting ISIS—suggest that what he fears is not just military entanglement: It’s entanglement of any kind, any uncertain investment of American leverage to try and shape outcomes in places where the locals’ interests are not already aligned with Washington’s. This is clear from his abandonment of any concerted nonmilitary effort to generate lasting stability in the Middle East in the way he still says is necessary. Obama’s own strategic judgment—announced publicly in May 2011 and repeated to Goldberg—is that stability in the Middle East will only emerge through addressing dysfunctional governance. But after the first blush of 2011, Obama demonstrated little readiness to invest political capital or build platforms for persistent engagement on behalf of the messy, imperfect, and always incomplete work of democratic growth. To the contrary, Obama cut funding for democracy assistance globally throughout his presidency. Between May 2011 and his 2013 speech at the United Nations General Assembly, democratic reform in the Middle East moved from a “top priority” to a bare footnote.

Having failed to implement his own views on the primacy of governance, Obama is now using force to defeat ISIS while abjuring the work necessary to build something with which to replace it. That path bodes ill for the anti-ISIS project he has launched, and recreates for the next U.S. president the same dysfunctions in U.S.-Arab relations—moral hazard, security overcommitments, and the like—that Obama resents. To be sure, the weakness and illegitimacy of state institutions and the upwelling of societal conflicts in the Arab world is making the process of reforming politics both lengthy and painful. But those challenges are the inescapable legacies of authoritarianism, and would have emerged no matter how or when the region’s regimes collapsed. They are certainly not a consequence of American intervention or mere “tribalism,” nor are they evidence, as Obama suggests, that American military intervention in Libya “didn’t work.” What didn’t work was the administration’s constant reliance on arguments about slippery slopes and the wisdom of restraint to shoot down proposals for deeper U.S. engagement in regional problem-solving—even and perhaps especially nonmilitary engagement. The policy debate may have been won in public, but the policy objective was lost.

It is a tragic irony: A president elected and reelected on a platform of ending wars in the Middle East has reproduced, at the end of his presidency, the very situation he inherited, decried, and swore to avoid: an escalating war against a vague terrorist enemy, with no geographic boundaries, no clear military or strategic objectives, and no principles or policies that might stop the slide down this slippery slope.

The Obama presidency’s relentless focus on avoiding entanglements came alongside a failure to reckon with risks—especially those risks that grow from inaction. This should be instructive for us all, but perhaps especially for those who, surveying the many messes in today’s Middle East, conclude that Obama was right to sit out the Syrian war, and is right today to regret his intervention in Libya as a failure.

The lesson is that inaction is not obviously better than action as a moral choice in foreign policy—it is a choice, and it carries consequences. The United States is a global power, one that moreover roots its global power in a set of universal moral claims. As such, America's choices (whether to do, or to not do) have global implications, and carry moral responsibility. One cannot avoid the moral responsibility for these choices by citing the Hippocratic Oath, or by creating some idealized set of criteria, the total fulfillment of which are necessary to justify even a limited use of American military power. While Obama repeatedly reminds Goldberg that his primary concern in contemplating force is the risk to the American people, not to citizens of other regions, the new war on ISIS reminds us powerfully that threats to others, left unaddressed, very easily land on America’s doorstep in ways its citizens see and feel.

Taking foreign policy seriously, and taking moral responsibility for American power seriously, means recognizing that all America’s choices have consequences, and policymakers must nonetheless choose a path in situations of imperfect information and facing imperfect options. A global power cannot simply avoid messes, ignore risks, and set its sights rigidly on the pursuit of strategic opportunities. It cannot do so because even the best opportunities can be torpedoed by unaddressed problems. Given the necessity and moral responsibility of choice, delay and avoidance in the face of those problems are merely the dishonest versions of a decision to do nothing.

That’s why I don’t condemn Obama for launching this new phase of the global war on terror, and I don’t think his supporters, who voted for an end to wars, should either. I commend him for recognizing the gravity of the threat ISIS presents to regional and international security, for admitting his long-held preferences cannot hold in the face of this challenge, and for stepping up to explain to the American people why and how he was reversing course. I only wish he’d admit that his reticence to recognize the risks of inaction helped make it so, and that, in that regard, the lessons he learned from his predecessors were woefully incomplete.