In his January 17 debate with Hillary Clinton, Bernie Sanders made what appeared to be a sensible comment about the future implications of the international accord between Iran and the P5+1 world powers, including the United States. “What we’ve got to do is move as aggressively as we can to normalize relations with Iran,” said Sanders. “Can I tell you that we should open an embassy in Tehran tomorrow? No, I don’t think we should. But I think the goal has got to be, as we’ve done with Cuba, to move [toward] warm relations with a very powerful and important country in this world.”

For Sanders, the statement was consistent with his long-held view that Iran, as a major regional power, has an important role to play in helping to stabilize the Middle East. In a press release last October, for instance, Sanders acknowledged that Iranian military forces could be useful in the regional struggle to suppress the Islamic State: “The war against ISIS, a dangerous and brutal organization, cannot be won by the United States alone. It must be won primarily by nations in the region—Saudi Arabia, Turkey, Qatar, Kuwait, Jordan, and Iran—which must be prepared to send ground troops into action to defeat Islamic extremists.”

But Clinton pounced.

The Clinton campaign released a letter, written by ten foreign policy establishmentarians, ridiculing Sanders. “Senator Sanders’ call to ‘move aggressively’ to normalize relations with Iran—to develop a ‘warm’ relationship—breaks with President Obama, is out of step with the sober and responsible diplomatic approach that has been working for the United States, and if pursued would fail while causing consternation among our allies and partners,” said the letter, whose principal author is Wendy Sherman, the former State Department official who led negotiations with Iran until last year. Sanders’ “call for more Iranian troops in Syria is dangerous and misguided and the opposite of what is needed. Supporting Iranian soldiers on Israel’s doorstep is a grave mistake.” Clinton cited the Sherman letter in the February 4 debate, where she continued her hawkish criticism of Sanders.

But in calling for urgent efforts to develop an improved relationship with Iran, Sanders is exactly correct.

The Iran accord, whose formal implementation took effect last month, is by far the most significant diplomatic achievement by the administration of President Obama. It drastically curtails Iran’s program, eliminating nearly all of its enriched uranium, severely curtailing its operation of uranium centrifuges, transforming its Arak heavy-water reactor to prevent the production of plutonium, and creating an iron-clad regime of inspections by the International Atomic Energy Agency, in exchange for an end to the international economic sanctions against Tehran. It virtually erases the threat of war that hovered over Iran since the Bush administration first placed Iran into an “axis of evil” in 2002, and it allows Iran reintegrate itself into the world economy.

More broadly, however—as Sanders indicates—the Iran accord creates an opening for Iran to play an expanded role in the Middle East and South Asia. In a region where country after country is wracked by chaos and civil war, Iran is a stable nation with great influence in Afghanistan, Iraq, Syria, and beyond. Were the United States to forswear regime change as a strategy toward Iran, and to seek to build on the P5+1 accord by reaching out to Iran diplomatically, at the very least Tehran could help support an accord ending the conflict in Afghanistan between Kabul and the Taliban and encourage the US-backed government in Baghdad to develop a new political compact that might begin to reconcile Shiite, Sunni, and Kurdish factions there. And, as Sanders notes, Iran is an implacable enemy of the Islamic State (ISIS or ISIL), which currently dominates swaths of northwest Iraq and parts of Syria and Libya.

The Sanders-Clinton discord on Iran is the clearest indication yet of the vast gap between the two candidates on foreign policy. Sanders, a longtime opponent of the Cold War and of many of America’s misadventures in Asia, Central America, and the Middle East, has staked out a position against US military intervention. Clinton, on the other hand, is a hawk with a lengthy record of backing the use of the US armed forces in overseas conflicts.

Well known, of course—as Sanders keeps reminding her—is Clinton’s vote in favor of the Iraq War authorization in 2002—a vote that probably led to her defeat in 2008 in the campaign against Barack Obama. But as secretary of state, she consistently backed war. In 2009, she joined then–Secretary of Defense Bob Gates in supporting the tripling of US troop levels in the war in Afghanistan to more than 100,000, against the advice of Vice President Joe Biden and others.

Subsequently, Clinton proved decisive in convincing Obama to topple Muammar Ghadafi in Libya, a regime-change action that has had catastrophic consequences. And after the start of the Syrian civil war in 2011, she was the loudest voice speaking out in favor of aggressive American support for mostly Islamist fighters against the government of President Bashar al-Assad, helping to escalate a conflict that has left 250,000 soldiers and civilians dead. (Since she became a candidate for president in 2015, Clinton has broken with President Obama—and with Senator Sanders, too—by supporting both the creation of a no-fly zone in northern Syria, enforced by the US Air Force, as well as vastly expanded arms supplies and training for Syrian rebels.)

In the 2016 campaign, all of the Republican front-runners denounce the Iran accord. In contrast, both Sanders and Clinton support it. Despite her support for the agreement, however, Clinton is implacably anti-Iran, and she uses language at least as hyperbolic as that of Ted Cruz or Marco Rubio. “Even without nuclear weapons, we still see Iran’s fingerprints on nearly every conflict across the Middle East,” she said, in a speech at the Brookings Institution last September. “They support bad actors from Syria to Lebanon to Yemen. They vowed to destroy Israel. And that’s worth saying again, they vowed to destroy Israel.… It’s a ruthless, brutal regime that has the blood of Americans, many others, and including its own people, on its hands.” In the same speech, speaking of the Iran-P5+1 accord, she said: “This is not the start of some larger diplomatic opening and we shouldn’t expect that this deal will lead to broader changes in their behavior.… My starting point will be one of distrust.”

Back in 2008, of course, when then-candidate Obama declared that he was ready to meet with Iran’s leaders, Clinton not only denounced Obama as naïve but, in a regrettable flight of rhetoric, said that she would “totally obliterate” Iran if it attacked Israel. And even as the White House pursued diplomacy with Tehran, Clinton maintained a brittle hostility in her approach to Iran.

So harsh was her rhetoric that Shane Bauer, one of three American hikers who was held prisoner in Iran after mistakenly wandering across the border from Iraq in 2009, dreaded hearing her speak. “I remembered sitting in my cell in 2009…when I heard then–Secretary of State Clinton’s voice from a television in a neighboring cell. I ran to the door and pressed my ear into its little window. She was commanding Iran to release us immediately. My heart sank,” he wrote recently for Mother Jones, adding that Clinton’s remarks would have precisely the wrong effect on his jailers. “I came to fear the sound of Clinton’s voice. Whenever I heard her publicly slam Iran about something, I would mentally prepare for at least another couple of months in prison.”

The differing approaches by Sanders and Clinton toward Iran have important implications inside Iran, too. Often called a dictatorship, Iran is in fact a nation with complicated domestic politics, where elections do matter and where politics is sharply divided among hard-line conservatives, pro-business moderates, and reformists. Harsh rhetorical attacks on Iran may play well among some American voters, but inside Iran they remind people of the long history of American involvement there, going back to the US/UK coup d’état in 1953, which ousted Mohammad Mossadegh, the nationalist prime minister, who’d overseen the nationalization of Iran’s oil industry. Such rhetoric, too, echoes the Bush-era calls for toppling Iran’s government as a follow-up to the invasions of Afghanistan and Iraq.

Since taking office in 2009, President Obama has consistently reached out to Iran, beginning with his inaugural speech in January 2009 and his landmark speech in Cairo in June 2009. Not only did Obama’s softened rhetoric strengthen the reformist Green Movement in Iran, but it led directly to the prolonged negotiations that resulted in the P5+1 accord. Sanders’s offer to seek normalization of relations with Iran continues in that vein, and it’s likely to bolster reformists and other moderates in Tehran. Clinton’s continued demonization of Iran, in contrast, provides ammunition to increasingly isolated hard-liners, including those who bitterly oppose the nuclear agreement, and risks tilting the balance inside Iran in their favor again.