In response to reports that U.S. and Iranian-backed forces were sharing a military base in Iraq’s Anbar province, an outraged Sen. John McCain (R-Ariz.) said that “it’s an insult to the families of the American soldiers that were wounded and killed in battles in which the Shia militias were the enemy. Now, providing arms to them and supporting them, it’s very hard for those families to understand.” Prominent hawkish analysts echoed his complaint.

The de facto cooperation between the United States and Iranian-backed militias in the battle against the Islamic State in Iraq has been apparent for some time. It is not surprising that such cooperation would anger those for whom confrontation with Iran is the highest strategic priority. However, the expressions of outrage and disbelief from architects and advocates of the 2007-08 U.S. troop “surge” in Iraq are more baffling. U.S. cooperation with Sunni insurgency factions, despite the copious amount of American blood on their hands, was among the most crucial and contentious dimensions of the surge.

As Gen. David H. Petraeus explained in his own retrospective: “The decision to support the Awakening movement and, in essence, reconciliation carried considerable risk and was not initially embraced by all of our commanders. Many correctly pointed out that the leaders and members of the groups that wanted to reconcile with us — groups that might be willing to embrace the Awakening — had American blood on their hands. … I was convinced that there was no alternative if we were to reduce the violence and divert key elements of the Sunni insurgency from their actual or tacit support for the actions of al-Qaeda.” McCain and other hawks accepted this logic for the surge, and many also accept a similar set of tradeoffs with regard to supporting Syrian rebels.

Were the moral, political and strategic dilemmas of cooperation with Sunni insurgents during the 2007 surge less dramatic than those posed by today’s cooperation with the Iraqi state and Iranian-backed militias?

Assessing either the 2007 choice to align with Sunni insurgents or today’s less-direct coexistence with Shiite militias requires considering both short-term military and longer-term political impacts. The flexibility of U.S. military commanders in agreeing to work with Sunni insurgent groups paid off, at least in the short-term. Over the course of the campaign, some 100,000 “Sons of Iraq” were placed on the U.S.  payroll, including many fighters from the Islamic Army of Iraq, the 1920 Revolution Brigades and other insurgent groups that had been alienated by the Islamic State of Iraq’s power grab in Sunni areas.

In one of the most thorough academic analyses of the surge, Stephen Biddle, Jacob Shapiro and Jeffrey Friedman showed that the 2007-08 drop in violence depended upon “a synergistic interaction between the surge and the Awakening,” noting that “without the Awakening to thin the insurgents’ ranks and unveil the holdouts to American troops, Iraq’s violence would probably have remained very high until well after the Surge had been withdrawn and American political patience with the war exhausted.”

The strategic, political and moral choices required to cooperate with Sunni insurgents before and during the surge closely resemble those raised by today’s much lower degree of cooperation with Iranian-backed militias. The Sunni insurgent factions that flipped to the coalition’s side clearly espoused radical Islamist and sectarian ideologies, had vast amounts of American and Iraqi blood on their hands and openly challenged the legitimacy of the Iraqi state. It was clear that the interests of the United States, the Iraqi government and the militias only temporarily aligned because of the shared threat posed by the Islamic State of Iraq. Those involved in the policy debate understood that empowering armed non-state actors could have dangerous long-term political effects by undermining the authority of the state and exacerbating sectarianism.

A serious assessment of the tradeoffs involved with collaboration with pro-Iranian militias would need to similarly grapple with the failures of the surge. For the gamble on collaborating with Sunni insurgents to pay off in the longer term, the Iraqi government would have needed to effectively integrate them into the state and achieve a broader political accommodation with the wider Iraqi Sunni community.

Aware of these dangers, Ambassador Ryan Crocker pushed Iraqi Prime Minister Nouri al-Maliki hard on political reconciliation and the durable integration of the “Sons of Iraq.” But Maliki staunchly resisted these American efforts, either out of naked sectarianism or skepticism about the true loyalties of these “former” insurgents. While many now prefer to blame the political failure on Obama’s withdrawal of U.S. troops from Iraq, the reality is that Maliki resisted accommodation even during the previous period of large-scale deployment of U.S. military forces, intense American political engagement and the Iraqi government’s near-complete security dependence on the United States. Maliki’s recalcitrance ultimately drove the subsequent defection of many cadres back to the side of the insurgency, which led to Iraq’s subsequent collapse back into civil war.

The Obama administration’s willingness to work alongside pro-Iranian militias should be viewed through the lens of the Bush administration’s willingness to work alongside Sunni insurgency factions and strongly support the sectarian, Iranian-backed Maliki. This does not mean that such cooperation is necessarily the right choice. As in 2007, the short-term military calculations favor such cooperation against the more urgent threat posed by the Islamic State, especially given the absence of viable alternatives.

However, the broader horizon of the surge suggests the need to take into account both the short-term military gains and subsequent political failures. Military gains will have little enduring value if armed, sectarian militias drive sectarianism, further Sunni alienation and hasten the disintegration of the state. That, presumably, is why the Obama administration has prioritized the rebuilding of the Iraqi Army and has insisted on working through the central Iraqi government.

While many have given up on the idea of a unified Iraq, the United States still views its survival as an important U.S. interest. Whether cooperating with such militias proves a wise policy for that purpose will be determined ultimately not by short-term tactical results but by their impact on political accommodation and state authority — the same political calculations with which Petraeus and Crocker wrestled nearly a decade ago.