Hillary Clinton, in Baghdad, in 2009. Photograph by Hadi Mizban/Pool/AP

Iraq is burning, and the zealots of the Islamic State are rampaging across the Middle East, beheading their captives and erasing borders. Is this Hillary Clinton’s fault?

Jeb Bush said as much this week, charging that Clinton, as Secretary of State during President Obama’s first term, “stood by” as American forces withdrew from Iraq and the country imploded, thereby clearing the way for the Islamic State. “Where was the Secretary of State, Secretary of State Clinton, in all of this?” mused Bush in a speech at the Ronald Reagan Presidential Library, in Simi Valley, California. “Like the President himself, she had opposed the surge, then joined in claiming credit for its success, then stood by as that hard-won victory by American and allied forces was thrown away.”

That the Obama White House lost Iraq by pulling out too soon, just when America was on the verge of victory, has become the Republican gospel. Is it true?

Let’s rewind the tape. By 2007, Iraq, under American occupation, had disintegrated into a terrible sectarian war. Sunnis and Shiites were butchering each other with breathtaking ferocity. The Kurds were preparing to secede, and regional players like Iran and Saudi Arabia were driving the combatants to greater depths of savagery. The Americans seemed utterly powerless to stop any of it.

But, instead of quitting, President George W. Bush—Jeb’s older brother—dispatched even more American forces, in a desperate gamble to stop the bloodbath. Very few people, even among the war’s supporters, imagined that it would work. Hillary Clinton and Barack Obama, both U.S. senators running for the White House, opposed it. But the “surge,” as the Administration called its counteroffensive, worked. It was helped along by other events, like the turning of the Sunni tribes against Al Qaeda. But, by mid-2008, violence had dropped so dramatically in Baghdad and the Sunni lands outside the capital that parts of country, at least to me, were unrecognizable. The group then known as Al Qaeda in Iraq, which dominated the insurgency, had been decimated.

What happened next is crucial. In 2008, President Bush concluded an agreement with the Iraqi government to withdraw all American forces by the end of 2011. Later that year, Senator Obama was elected President on the promise of getting America out of Iraq. At the time, Iraq was calm, the American people were exhausted, and most Iraqis wanted the U.S. out, too. In December of 2011, the last American troops departed.

Within twenty-four months, Iraq was again reeling toward collapse. What went wrong?

The argument advanced by Jeb Bush is that Iraq spun out of control because the Obama Administration, of which Hillary Clinton was a senior member, made the crucial decision to pull out all the troops before Iraq was ready. But, again, it was Jeb's brother who made that call—so, at best, Jeb is faulting Obama for not amending the deal.

Among those who wanted the Americans to stay in Iraq, the idea was this: that American forces had emerged in Iraq as an honest broker—indeed, the only honest broker—between the country's main factions. One of the most important roles that American forces played was to restrain Prime Minister Nuri al-Maliki, a militant sectarian Shiite, from running roughshod over his opponents. As long as American troops stuck around, the argument goes, Maliki stayed on his best behavior. When the American troops left, Maliki was free to persecute the country’s Sunni minority, eventually driving it into the arms of the successor to Al Qaeda in Iraq: ISIS. As Michael Barbero, the deputy commander of American forces in Iraq, told me last year, “Everything that has happened there was not just predictable—we predicted it.” (There is a fuller picture of how Iraq imploded in a piece I wrote for The New Yorker.)

I think this argument is partly, but only partly, correct. It’s true that the Americans often stopped Maliki from acting in a blatantly sectarian way. If some troops had remained after 2011—and not necessarily combat troops—the Americans might have able been to stop Maliki from driving the Sunnis toward ISIS. As Sami Al-Askari, a member of the Iraqi parliament, told me last year, “If you had a few hundred here, not even a few thousand, they would be coöperating with you, and they would become your partners. But, when they left, all of them left. There’s no one to talk to about anything.”

The Obama Administration’s supporters counter that the Iraqi government would not agree to the conditions necessary for American forces to remain in the country after 2011—that the decision was Maliki’s, not Obama’s. But Obama’s fault, according to both American and Iraqi officials who were involved in the negotiations, was that he didn’t try very hard to close the deal. They believed that an agreement might have been possible but for the apathy that was emanating from the White House. The talks ultimately fell apart over the question of immunity for American troops from Iraqi law. The Americans insisted on it, and Maliki was not prepared to ask the Iraqi parliament to approve it. Maliki did offer to sign an executive agreement guaranteeing American immunity, but the White House rejected it. (The Obama White House ended up accepting just such an agreement last year, when it sent American forces back to Iraq.) American diplomats and generals who were trying to make a deal with Maliki told me that they got almost no guidance from the President until the last possible moment. It wasn’t surprising that the deal fell apart.

Where does this leave Hillary Clinton? By all accounts, she was one of the people inside the Administration who advocated for keeping a residual force in Iraq. “Hillary very much wanted to keep troops in the country,” James Jeffrey, the American Ambassador to Iraq at the time, told me. This does not amount, in Jeb’s words, to “standing by” while Iraq burned.

Moreover, I think the Republican argument that a handful of American troops could have saved Iraq misses a larger point. The fundamental problem was American policy—in particular, the American policy of supporting and strengthening Maliki at all costs. Maliki was a militant sectarian his whole life, and the United States should not have been surprised when he continued to act that way once he became Prime Minister. As Emma Sky, who served as a senior adviser to the American military during the war in Iraq, put it, “The problem was the policy, and the policy was to give unconditional support to Nuri al-Maliki.” (Sky’s book, “The Unraveling,” is the essential text on how everything fell apart.) When the Americans helped install him, in 2006, he was a colorless mediocrity with deeply sectarian views. By 2011, he was an unrivalled strongman with control over a vast military and security apparatus. Who enabled that?

First, it was the Bush White House. Then the Obama White House—Clinton was a part of that team, of course, but the official with primary responsibility for Iraq was Vice-President Joe Biden. Biden was a firm backer of Maliki, because it was through Maliki that the Americans seemed sure of an easy exit.

The real turning point in Iraq came not in 2011, when the last American troops departed, but in 2010, following national elections there. In the long deadlock that followed the voting, American diplomats backed away, acquiescing to an Iranian-brokered deal to allow Maliki to continue as Prime Minister. The constitutionality of the deal was deeply suspect, but the Americans averted their eyes. The Iranian price for backing Maliki was clear: he would throw out the American troops. “We were so focussed on getting out that we let the Iranians form the government,” Sky said.

So, back to Jeb Bush’s claim. What’s the verdict on Hillary Clinton? She played a supporting role in a disastrously managed withdrawal, which helped lay the groundwork for the catastrophe that followed. And that was preceded by the disastrously managed war itself, which was overseen by Jeb Bush’s brother. And that was preceded by the decision to go to war in the first place, on trumped-up intelligence, which was also made by Bush’s brother.

All in all, when it comes to Iraq, Clinton doesn't have a lot to brag about. But Jeb Bush might want to consider talking about something else.