Fatemeh Aman co-authored this article.

As President Obama met his top Afghanistan commanders in the Oval Office on February 4 to discuss his decision to reduce the U.S. military presence in Afghanistan, he received a compliment from an unlikely source. Ali Akbar Velayati, the top foreign policy aid to Iran’s Supreme Leader, Ayatollah Khamenei, called Obama’s Afghan withdrawal policy “wise.”

The accolade was rare, considering the source, but also double-edged. Critics of President Obama will say that Iran, like other rivals, senses folly in Washington’s Afghan policies and now sees an opportunity to fill the power vacuum in Kabul if and when the Americans finally leave.

Such interpretations, however, miss a larger and more fundamental point about Tehran’s evolving perspective on Afghanistan. That is, the Iranians need the Americans in Afghanistan. Tehran’s shared vision with Washington about the post-Karzai era is much more likely to serve Iran’s national interests than those of the other key regional players, namely Pakistan and Saudi Arabia. Those two nations have been Tehran’s traditional cutthroat rivals in the Afghan arena, and their appetite for influence in Kabul has not diminished over the years.

Tehran and Washington share an important objective: neither wants to see the Taliban or any other manifestation of extremist Sunni Pashtun ideology return to power in Kabul. As has been extensively documented, this would not be the first time that the United States and Iran have shared a common understanding about Afghanistan. Tehran was, after all, the chief beneficiary of the toppling of the Taliban by American forces in the winter of 2001.

The Iranians played an important role in that campaign, too, as senior American officials such as U.S. envoys Ryan Crocker and James Dobbins have chronicled. The critical assistance that the Iranians provided ranged from military and intelligence cooperation to dislodge the Taliban to the use of Tehran’s political clout among Afghan factions to create the Karzai government in the first place. 

Since the fall of the Taliban in 2001, Iran’s attitude toward the U.S. presence in Afghanistan has been simultaneously “grateful and fearful”: grateful that the Taliban were overthrown, but fearful that Iran would be the next American target, especially because the U.S. military was now anchored next door on Afghan soil.

Although an American invasion of Iran never happened, the Iranians have walked a fine line since 2001, carefully working to weaken America’s position in post-Taliban Afghanistan.  According to President Hamid Karzai, Iran has been the only regional player opposing the bilateral strategic agreement (BSA) that underpins negotiations between Kabul and Washington.  Nearly all other countries consulted by Kabul, including Turkey, India, the Arab states of the Persian Gulf and the Central Asian countries, have shown support for the long-term American security commitment to Afghanistan.

Iran’s public opposition to the BSA, on the other hand, has included threats to force Kabul to give up on its plans. In one instance, the Iranian ambassador to Kabul warned that Tehran could repatriate roughly three million Afghans living in Iran as punishment should Karzai sign the agreement over Iranian objections.

Still, Tehran has had to be careful that its undermining of U.S. policies in Afghanistan does not come at the cost of the Taliban gaining political ground.  Moreover, their strategy was based on the United States and Iran being engaged in a zero-sum game across the broader Middle East. Now, however, as we witness something of an Iranian-American thaw, the challenge for Tehran and Washington is to find ways to resuscitate that temporary but vital moment of cooperation over Afghanistan that occurred back in 2001. This collaboration is now possible and should be prioritized by both countries as they look to broaden and build on the nuclear deal that Tehran and the P5+1 countries struck in Geneva in November.

The Iranians would be foolhardy to stick to their obstinate posture on the BSA It will not only exacerbate American frustrations with Tehran but also irk the mainstream Afghan political establishment that is broadly in favor of the agreement, despite their president’s hesitance. With Karzai on his way out of the presidential palace, Tehran should be looking ahead to the post-Karzai era.

Tehran’s opposition to the BSA also contradicts President Hassan Rouhani’s stated policy to look for common ground that can help bring Iran closer to its traditional adversaries. No opponent is more important to Iran’s future trajectory than the United States, and no subject is better suited for synchronization of Iranian and American policies than the future of Afghanistan. 

Any serious revival of Iranian-American cooperation will be significant. Washington and Tehran are two of the most influential players in Afghanistan today. After the United States, Iranian political and economic investments in Afghanistan are among the most noticeable in the country. Tehran’s soft-power reach among certain segments of the Afghan society—particularly the minority Shi`a community—is unrivalled.

And the Iranians—despite their anti-U.S. posturing—understand that the American presence in Afghanistan has amply served Iran. The U.S. military, regardless of the setbacks it has faced, has kept the Taliban away from power, and Washington has helped facilitate changes to the Afghan constitution, which were unthinkable before the fall of the Taliban in 2001. Afghans from Shi`i and ethnic Hazara backgrounds—Iran’s historic allies in Afghanistan—have, thanks to the American presence on the ground, been empowered in mainstream Afghan politics as never before. These important achievements, however, are reversible, and the Iranians and their Afghan allies know that better than anyone else. 

The United States needs also to be willing to publicly acknowledge that Tehran has legitimate reasons for wanting to be a major stakeholder in post-Karzai Afghanistan. As was experienced during the recent Geneva II talks about the future of Syria, the Iranians will withhold cooperation if they feel that they are kept at a distance by Washington. The government of Rouhani, which craves international legitimacy, wants to be openly called on by the Americans to help shape realities on the ground in Afghanistan that can serve the interests of both countries. Whilst cooperation in Afghanistan cannot resolve all outstanding disputes between Tehran and Washington, it can become a significant driver in a broader process of confidence building.

Fatemeh Aman, formally with the RFE/RL and Voice of America, is president of Global Media Trail, and specializes in Iran's relations with South Asia.

The Middle East Institute (MEI) is an independent, non-partisan, non-for-profit, educational organization. It does not engage in advocacy and its scholars’ opinions are their own. MEI welcomes financial donations, but retains sole editorial control over its work and its publications reflect only the authors’ views. For a listing of MEI donors, please click here.