As president, Barack Obama's record in the Middle East was disastrous. Mass slaughter in Syria, ruinous refugee outflows, the rise of a terrorist proto-state, a belligerent Iran on the march—the 44th president left the region aflame, more dangerous than when he entered office. When discussing Obama's policies toward the Middle East, and all of their grisly consequences, it is natural to focus on the situation in the region itself. Often overlooked, however, is how the damage caused by Obama's approach was domestic, not just foreign. Indeed, the figurative fires and partisan divisions that he created in Washington, D.C., are in some ways more destructive than the real fires and sectarian divisions toward which he showed such apathy during his eight years in the White House.

The latest example of this domestic damage came last week, when the Democratic National Committee passed a resolution calling on the United States to re-enter the Iran nuclear deal, formally called the Joint Comprehensive Plan of Action, or JCPOA. The full DNC adopted the measure at its meeting in Washington, D.C.

"The United States should return to its obligations under the JCPOA and utilize multilateral and bilateral diplomacy to achieve political solutions to remaining challenges regarding Iran," the resolution says, decrying President Donald Trump's decision to withdraw the United States from the accord last May.

The DNC's resolution shows how Obama made not only the nuclear agreement detrimentally partisan, but also the country's broader approach to Iran and the Middle East. The measure is a clear sign that the Democrats running for president in 2020 will campaign to return the United States to the deal. Not that anyone needed more evidence: all the Senate Democrats who have launched bids for the presidency opposed Trump's decision to leave the JCPOA.

This point matters beyond campaign posturing. For months, experts on Iran have said the theocratic regime will try to wait out the Trump administration, to see what happens after the 2020 election. This strategy makes sense: if a Democrat who will return to the nuclear accord is elected president, then Iran has every incentive to wait out Trump's campaign of pressure, and not to do anything too provocative in the interim. Secretary of State Mike Pompeo has even accused John Kerry, his predecessor from the Obama administration, of telling the Iranians to wait out Trump. When pressed on whether he reassured Iranian officials that Trump will be voted out of office, Kerry never explicitly denied doing so.

Think about this situation: an enemy of the United States is basing its strategy toward its nuclear-weapons program on which political party is likely to win the next election, because both parties are so divided on the issue. Tehran knows that Democrats and Republicans are so diametrically opposed to each other regarding the JCPOA, and Iran more generally, that it can predict what will happen. A Democratic president will live and die by the nuclear deal, fearing any coercive action may provoke the regime to leave the agreement. A Republican president will effectively do the opposite, following Trump's model, more or less. In each case, the United States cannot find any bipartisan consensus on Iran's nuclear program, its imperial expansion across the Middle East, or its human rights abuses, undermining any ability to create sound, lasting policies. And Obama is largely to blame.

The chief legacy of Obama's foreign policy is not the Iran nuclear deal, but rather the visceral partisanship that he fostered at home while trying to defend the deal. As the country debated whether to support the JCPOA in the summer of 2015, recall how Obama demonized the accord's critics. He went so far as to compare them to the hard men of Iran's murderous regime. "It's those hardliners chanting ‘Death to America' who have been most opposed to the deal," Obama said in August 2015. "They're making common cause with the Republican caucus." Such language is vile and dishonest, but the president and his allies employed it consistently, using an "echo chamber" of experts and media figures to drown out any opposition, no matter how genuine and well reasoned. Obama also troubled American Jews at the time with his rhetoric, singling out Israel and flirting, perhaps unintentionally, with conspiracy theories about nefarious Jewish money seeking to influence the public debate.

The Obama administration and its allies also made support for the Iran deal a litmus test of loyalty for Democrats in Congress. "Opponents of the agreement said they could not remember another recent policy battle where the White House and [Rep. Nancy] Pelosi were so driven," the New York Times reported at the time. "In tandem, they made the Iran vote a strong test of party loyalty." Several Democrats expressed strong concerns about the deeply flawed deal, but they were pressured to fall in line, no matter their reservations. Only a few voted no.

Meanwhile, as Obama waged his campaign of demonization against the deal's critics, he carried on a similar campaign against America's traditional allies in the Middle East, especially Saudi Arabia. Obama's contempt for the Saudis has been well documented, and, whether intentional or not, his approach to the region put the Democratic Party in the position of defending Iran and criticizing Saudi Arabia. Naturally, the Republicans did the opposite.

So what do we have now? One party effectively supports the regime in Iran and opposes Saudi Arabia, while the other party opposes Tehran and supports the Saudis. Both regimes are odious, but the Saudis are, like it or not, an essential strategic ally. They are an important security partner and ensure the free flow of oil from the Middle East. Iran's leaders, meanwhile, chant "death to America" and seek regional preeminence.

A country so divided on the Middle East cannot create effective policies in the region. American leaders cannot even agree on who their friends and enemies are. How can they possibly come to some kind of a bipartisan consensus? The DNC's resolution is a reminder of how far apart Democrats and Republicans are regarding the Middle East, and especially Iran. Of course the parties were never entirely on the same page. But the partisan divide grew substantially during Obama's presidency. His campaign to garner support for the Iran deal at all costs hurt American national security in the long run. Obama did not just cause lasting damage to the Middle East; he also caused lasting damage to Washington, D.C.