What explains the change? Above all, it’s the legend of the surge. The legend goes something like this: By sending more troops to Iraq in 2007, George W. Bush finally won the Iraq War. Then Barack Obama, by withdrawing U.S. troops, lost it. Because of Obama’s troop withdrawal, and his general refusal to exercise American power, Iraq collapsed, ISIS rose, and the Middle East fell apart. “We had it won, thanks to the surge,” Senator John McCain declared last September. “The problems we face in Iraq today,” Louisiana Governor Bobby Jindal argued in May, “I don’t think were because of President Bush’s strength, but rather have come about because of President Obama’s weakness.”

For today’s GOP leaders, this story line has squelched the doubts about the Iraq invasion that a decade ago threatened to transform conservative foreign policy. The legend of the surge has become this era’s equivalent of the legend that America was winning in Vietnam until, in the words of Richard Nixon’s former defense secretary Melvin Laird, “Congress snatched defeat from the jaws of victory by cutting off funding for our ally in 1975.” In the late 1970s, the legend of the congressional cutoff—and it was a legend; Congress reduced but never cut off South Vietnam’s aid—spurred the hawkish revival that helped elect Ronald Reagan. As we approach 2016, the legend of the surge is playing a similar role. Which is why it’s so important to understand that the legend is wrong.

By 2006, three years after American troops deposed Saddam Hussein, the situation in Iraq had grown terrifying. Violence had begun with a largely Sunni insurgency against the American occupiers and the Shia Muslims they had brought to power. But after Sunni jihadists bombed a famous Shia mosque in Samarra that February, Shia militias retaliated, sparking wholesale slaughter across the sectarian divide. The Tigris River became so clogged with human corpses that some Iraqis stopped eating its fish, believing their taste had changed.

In January 2007, Bush responded to these horrors not by withdrawing U.S. troops, but by sending 30,000 more. He also redirected U.S. military strategy. Under the leadership of General David Petraeus, U.S. troops began focusing less on killing insurgents and more on protecting Iraqi civilians, in hopes of reducing the insecurity that allowed the insurgency to thrive. American troops, working alongside Iraqi ones, went to live among the Iraqi people.

Fortuitously, these changes coincided with a shift among some Sunni leaders. By 2007, many had grown alienated by the harsh fanaticism of the al-Qaeda jihadists who had taken up residence in their midst. More important, some Sunni leaders realized that they could not defeat the more numerous Shia. Driven out of large sections of Baghdad, they came to see American troops as the only force capable of saving them.