by Alex Vatanka, Contributing Scholar, Arabia Foundation; Senior Fellow, Middle East Institute

History will probably conclude that President Barack Obama took a gamble on the Islamic Republic of Iran and lost. “Yes, we can” was supposed to be a powerful antidote to all sorts of obstinate policy challenges. In the realm of foreign policy, the cold war between the United States and the Islamist ruling class in Tehran had perilously lingered since the Iranian Revolution of 1979. In the interim, thanks to the 2002 discovery of Iran’s nuclear ambitions, the Iranian question had been elevated to a US national security priority.

Obama’s pitch was simple: engaging with Tehran was the only way forward. And yet, in all of his laudable efforts, Obama failed to foresee another equally simple proposition: that the top echelons of power in Tehran had little desire to sincerely engage with Washington. Anti-Americanism was a pillar of the Islamic Republic’s ideology. Tehran wanted to keep it that way.

Misreading Khamenei

In his 2008 presidential campaign, Obama promised to turn the page and—unlike his predecessors—engage the leadership in Tehran directly. “The notion that somehow not talking to countries is punishment to them—which has been the guiding diplomatic principle of [the George W. Bush] administration—is ridiculous,” he said on the campaign trail.

Once in the White House, Obama set out to pursue “tough, direct presidential diplomacy with Iran without preconditions.” Obama’s national security team was clear-eyed about the division of power in Tehran and about who ultimately had the clout to deliver results on the Iranian side. In its overtures toward Tehran, the Obama White House ignored Iran’s vexatious president Mahmoud Ahmadinejad and aimed directly at Iran’s supreme leader, Ayatollah Ali Khamenei. But while Obama’s team got Iran’s power pyramid right, they woefully misread Khamenei.

In believing that Khamenei’s core fear related to American intentions toward the Islamic Republic, the Obama team set out to reassure the Iranian leader. Unprecedented action was taken. Over the course of the first half of 2009, Obama sent two private letters to Khamenei vowing that Washington had no intention of bringing about regime change in Tehran. That is, the US president, elected on a platform of change, bent over backwards in declaring that Washington had no desire to bring about regime change in Tehran. Popular Iranian opinion inside the country and among the five-million-strong Iranian diaspora never forgave Obama for that needless acquiescence.

Khamenei replied in kind to Obama, but he never then—nor has he since—strived to reconfigure his regime’s built-in anti-American core. Despite the fact that the Obama administration did nothing to aid Iran’s massive Green opposition movement when it rose up against Khamenei’s regime in the summer of 2009, the Iranian supreme leader still pointed to Washington as the culprit. Khamenei and his cohorts had as a rule blamed the United States for everything and anything that needed to be conveniently excused and explained away. Faced with massive popular disgruntlement over the regime’s policies at home and abroad, Iran’s leadership once again deployed the ruse of blaming the United States. Obama’s private letters to Khamenei did not change that basic equation.

In other words, it was clear early on in the Obama presidency that Khamenei was at best good for narrow tactical concessions if circumstances called for them. He never had any intention of swinging the strategic pendulum away from anti-Americanism, the bread and butter of his regime.

When the Obama administration successfully built an international coalition to confront Iran’s nuclear ambitions, Khamenei succumbed to the pressure. Knowing full well that in the long run Iran’s fragile economy could not withstand the painful international sanctions, he permitted secret talks to be held with the Americans.

Tellingly, the end goal in his mind was a narrow policy objective: to find a way to end the nuclear saga and have the sanctions lifted. Khamenei spoke of respect begetting respect, but his actions kept the United States in place as Iran’s impeccable foe.

Some of the posturing was no doubt about saving face. Khamenei is stewarding a regime that has for nearly four decades devotedly nourished a worldview in which the United States is the angel of darkness and a superpower that has to be confronted at every turn. For the purportedly foolproof Khamenei—a man who is said by his followers to be God’s representative on earth—a climb-down on the American question would be tantamount to fallibility.

In his March 2012 Persian New Year message, months after he had approved talks with the Americans but just as international economic sanctions were starting to seriously bite, Khamenei went on the offensive. He spoke about “economic self-sufficiency,” saying that the United States and other Western nations were in no position to act against Iran militarily. But this was pure brinkmanship. Khamenei knows that Iran is no North Korea, which can cut itself off from the rest of the world.

Worsening economic conditions had a direct impact on the extent of popular mobilization against the regime. Khamenei was cornered and close to overseeing the implosion of the Iranian economy. His call for “self-sufficiency” had over the course of months been superseded by his call for “heroic flexibility,” a code for making any concessions necessary to safeguard the future of the Islamic Republic. It was a perfect moment for the Obama White House to drag Khamenei out of his comfort zone and aim to broaden the basis of the talks between the United States and Iran.

As it turned out, the July 2015 nuclear accord ended up being solely focused on the number of centrifuges Iran could spin and other nuclear-specific limitations imposed on the country for a specific time period.

Nonnuclear Concerns

The litany of other concerns about the Iranian regime’s behavior—from its suppression of its own people to its expansionist agenda in the post–Arab Spring Middle East—were left unaddressed by the Obama–Khamenei pact.

In its defense, the Obama administration maintained that a comprehensive bargain that might have tackled all of the concerns of the United States and its allies, such as Israel and the Gulf Arab states, was never a realistic goal. Still, this presupposition downplays how fearful Khamenei was in 2012 about his grip on an increasingly anxious Iranian population and how much more he might have conceded in other arenas if the appropriate pressures had been put on Tehran.

After all, the regime of Ayatollah Khamenei is hardly a suicidal one. It bases its policies on a careful cost–benefit analysis. President Obama’s critics see him as having been engrossed with the idea of cutting any deal with Tehran, saying that he was, above all, focused on the success of his signature foreign policy achievement, instead of extracting the maximum possible concessions from Khamenei at a time when Obama clearly had the upper hand and much international support to bank on.

While that assessment might be uncharitable, there is no doubt that Obama wanted to be the anti-Bush. He wanted to be the US president who learned the lessons of the disastrous US military invasion of Iraq in 2003 and sought to defuse challenges emanating from the Middle East through the art of diplomacy. Indeed, a case can be made that Obama overlearned the lessons of the 2003 Iraq War.

History will show if Khamenei was successful in duping Obama. As of today, one can make a good case that Khamenei did indeed do just that. In August 2013, shortly after Khamenei approved middle-of-the-road Hassan Rouhani as the person who would become Iran’s president, the Iranian supreme leader conceived of another idea.

President Rouhani and his Western-centric inner circle were given control over the nuclear file, albeit with the understanding that none of Khamenei’s red lines would be crossed during the talks with the United States and the other members of the P5+1 formation.

The file was swiftly transferred from the Supreme National Security Council (SNSC)—where Khamenei and the generals from the Revolutionary Guard wield a disproportionate degree of power—to the Foreign Ministry under the supervision of Javad Zarif. And once a deal had been secured in 2015 and international sanctions were soon thereafter lifted, the same Rouhani team was entrusted to go out in the world and drum up business to help rejuvenate the ailing Iranian economy.

Meanwhile, the generals from the Revolutionary Guard were left in charge as spearheads of Iran’s regional military interventions from Syria to Iraq to Yemen, with the aim of expanding Tehran’s power projection. Khamenei had unleashed two arms of the Iranian regime for two different foreign policy purposes but with the singular objective of strengthening Tehran’s overall hand.

This was Khamenei, the patriarch of the Islamic Republic, double-dealing Obama. But the US president was by now deeply vested in safeguarding the 2015 nuclear accord, so this tied his hands and prevented his ability to respond to Tehran’s nonnuclear shenanigans amid an increasingly fluid geopolitical situation in the Middle East where US interests were under threat.

Maybe Khamenei viewed Obama’s initial overtures in 2009 as a sign of softness, which in turn set the tone for the ensuing years. However, the fact that Obama took the initiative should not be held against him.

Obama’s fault was in misreading Khamenei: how he balances power in Tehran and how he seeks to shore up legitimacy at home. Above all, the Obama team seriously misjudged how badly Khamenei needs the United States as a straw man to rationalize the many shortcomings of the Islamic Republic.

In his furthermost expectations, President Obama had believed a nuclear deal with Iran would pave the way for normalizing relations between Washington and Tehran. And while on Obama’s watch the United States and Iran came the closest to having functioning diplomatic ties since the 1979 Iranian Revolution, resumption of ties with Washington was never in the cards for Khamenei.