On June 6, Khorasan Province of Islamic State claimed credit for the killing of Sher Wali Wardak, an Afghan parliamentarian. If confirmed, the killing will represent a new chapter in ISIS’s capacity to operate in Afghanistan. The attack happened as professors from Ghazni University in the eastern part of the country are warning of ISIS infiltration of the university, another sign that the group seeks to expand its base of support in the country. Elsewhere, Afghan media have reported that Al Qaeda is making efforts to strengthen its relations with the Taliban, which has been confirmed by Gen. Charles Cleveland, spokesman for NATO and U.S. forces in Afghanistan. While radical Islamists of various shades continue to conspire and thrive on Afghan soil, the necessary pushback by regional states and the international community is still not in place. Fighting radical Islamists in Afghanistan represents a golden opportunity for international cooperation, including the United States, Iran and Pakistan. History shows it can be done.

Cursed to Be a Battleground

The idea of securing peace in Afghanistan in the foreseeable future might seem to be a pipe dream today. A decade and half after the toppling of the Taliban in late 2001 and many billions of dollars in foreign aid, the country still faces an array of calamitous challenges. From political gridlock and petty competition for power among the country’s small elite, to prevalent corruption, to a widespread sense of hopelessness within the general population, Afghanistan sits in a hard place. In the midst of all its domestic struggles, Afghanistan also needs to contend with the rivaling agendas of foreign powers, including those states—such as the United States—that are still engaged in stabilization efforts in the country, and neighboring states—such as Iran and Pakistan—that continue to view Afghan soil as battleground for geopolitical rivalry through support for local proxies. This state of affairs is hardly a new development. History shows that for decades Afghanistan has been a stage for turf wars among regional actors.

Another equally important reality is that warring Afghans are themselves mostly to be blamed for always seeking external patrons. But recent history also shows that when principal foreign actors with a vested interest in Afghan affairs converge on the lowest common denominator, Afghanistan benefits. Throughout the period from the end of the Second World War until the invasion of Afghanistan by the Soviet military in December 1979, that common denominator was the threat posed by Moscow to Afghan sovereignty. This test was the central point that for decades unified American, Iranian and Pakistani interests on the Afghan question.

Today the Soviet Union has long disappeared from the political map, but extremist Islamists from Taliban, Al Qaeda and now ISIS all pose a menacing threat to Afghanistan on the back of a debilitated central government in Kabul. This threat and many other questions on the future of Afghanistan appear at a time when Iran is about to resurface on the global mainstream stage, following years of isolation due to its controversial nuclear program. Not only is Iran a key player that can go a long way to constructively shape Afghan politics, but other key players in this context—most notably the United States and Pakistan—have separately signaled a willingness to cooperate with Tehran whenever a mutual interest is at stake. In such a setting, nothing is perhaps more pressing for all three states—the United States, Iran and Pakistan—than to find ways to collaborate to help Afghanistan stand on its feet.

Zero-Sum Games

What probably trumps all other obstacles in the path of international cooperation on Afghanistan is the still dominant tendency to consider the country as a winner-take-all proposition. That is to say, a conviction that going it alone and with those states that shares one’s narrow objectives, and thus hoping for the largest dividend in terms of amount of leverage in shaping Afghanistan’s trajectory, is preferable to alternatives. That is certainly the unfortunate reality of postures adopted by Iran and Pakistan—both with a rich history of having backed various Afghan groups—but also other important regional actors, such as Saudi Arabia, the United Arab Emirates and the Russian Federation.

Consider the important issue of regional cooperation and the long-term hope for economic integration in a part of the world where cross-border partnership is dismally limited. In April 2016, it was announced that Afghanistan, India and Iran completed negotiations on the use of Chabahar, a southern Iranian port on the Indian Ocean that has for decades been identified as a strategic channel linking the landlocked states of Central Asia and Afghanistan to international waters. The port is considered a huge boon to Afghan international trade potential and the economic growth that might come as a result.

The announcement came during a visit to Tehran by the Indian oil minister, Dharmendra Pradhan, who also pledged $20 billion in Indian investments in the port complex. The size of the pledged Indian financial commitment to the project is certainly striking compared to the trend in the region. But what is not innovative is the basic premise behind India’s intention to invest in Chabahar. Delhi’s goal is to sideline Pakistani territory in regional infrastructure projects linking the Indian market to Central Asia and Afghanistan. This is a supreme example of the zero-sum mentality that has long plagued West Asia and the Indian subcontinent. However, the Indians and their Iranian cohorts in this effort are not alone in acting in such a unilateral fashion as to undermine broader and more inclusive regional integration.

If fact, the exact blueprint is used by officials in Islamabad, which with the help of China seeks to make Chabahar’s rival—the port of Gwadar in Pakistani Baluchistan—into a strategic hub that can service the Afghan and Central Asian hinterlands. In 2015, China announced $46 billion in investment as part of the China-Pakistan Economic Corridor, which includes Islamabad giving Beijing ownership of Gwadar Port and making it into a free trade zone to enable Chinese-driven commerce from the proposed commercial center.

And yet this state of affairs cannot be merely attributed to Iran and Pakistan becoming pawns in the swelling Sino-Indian competition for power and influence across Asia. Tehran and Islamabad not only provide the physical bases for such Sino-Indian projects, but have in fact been cheerleaders for such extraregional matchups, with the hope that schemes they support will prevail. In the case of the port of Chabahar, the winner-takes-all viewpoint was evident from the earliest days when it was no more than a concept.

Back in 1972, shortly after Zulfikar Bhutto had assumed power in Pakistan, he quietly offered the United States access to air and naval bases in the country’s Baluchistan province. What was notable about the hushed offer was that it came very shortly after the shah of Iran, and Bhutto’s dependable ally, had announced a $8 billion project to turn Chabahar into Iran’s first deep blue-water port on the Indian Ocean. The shah had, among other things, intended to provide a base for large U.S. Navy vessels, and Bhutto moved to undercut him with a counteroffer to Washington. The most telling part of this episode was that it occurred at a time when both Iran and Pakistan were firmly in the U.S. camp against the Soviet Union, and were otherwise at least rhetorically committed to closer ties through various mechanisms in which both enjoyed membership, including the Central Treaty Organization (CENTO) and the Regional Cooperation for Development. Despite all the fanfare, when it came to concrete action, Iran and Pakistan were anything but hand-in-hand.

Goodwill Years

Nonetheless, history also shows that Iran and Pakistan have in the past been able to cooperate on diplomatic, security and economic matters when conditions called for it. The Afghan question was at the heart of it and United States was at the same time a major driving force and enabler of such cooperation among the three countries. The U.S. objective was principally to prevent a successful Soviet push southwards into the region from Soviet Central Asia, and Washington at the time held the belief that it was encouraging an integration trend that was already in motion.

From the late 1950s, before Iranian state coffers enjoyed their unprecedented windfall from oil incomes, there were voices in Islamabad that argued closer policy coordination across the board with Tehran would bring many benefits, including lessening the tension in Afghanistan-Pakistan ties. The same Zulfikar Bhutto would also as late as the mid-1970s ask the Pakistani foreign ministry to prepare policy papers on the issue of a potential confederation with Iran. The Shah too entertained the idea of Pakistan as an anchor to bolster his position in the region. Throughout the 1950 and 1960s, Afghanistan was touted as the third leg in this discussed regional confederation.

U.S. planning took into account practical military needs as much as political considerations. Were a confederation to be achieved, Afghanistan’s vast landscape would, it was said, give Pakistan additional space in which to maneuver her military forces against a Soviet invasion. Still, the by far the weakest link in the debated idea of an Afghanistan-Iran-Pakistan confederation was the dismal state of affairs between Kabul and Islamabad. Relations had begun very badly at Pakistan’s independence in 1948 and remained tense. Here the shah of Iran proved more than apt, albeit only occasionally and never lastingly. In the 1960s and 1970s, he repeatedly engaged in shuttle diplomacy to calm tensions between his quarrelling eastern neighbors. In order to pave the way for reconciliation and economic growth as a prerequisite to maintain peace, successful attempts were made to integrate on various levels. As early as 1962, Tehran and Kabul signed a five-year transit agreement, providing Afghanistan with an important alternative conduit to the world. However, there is no evidence that Iran’s intention was ever to gain more leverage in Afghanistan at the expense of the Pakistanis.

Washington soon recognized that a confederation required too many political concessions from all parties involved, and changed tack. CENTO, an entirely untested military alliance, became the chief vehicle for closer economic integration, including U.S.-supported pan-regional development of road, rail and communication infrastructures. The idea was to make some of Iran’s ports on the Persian Gulf into centers for commerce and link them up via a network of roads to Afghanistan and Pakistan.

Lessons from the Past

Back then, Washington’s bottom line was clear: it would support Afghanistan as long as its government was not unfriendly, in order to prevent Kabul from falling into Moscow’s lap. A key element in this was to broker better ties between Afghanistan and Pakistan; here, Iran was a net positive contributing factor. The legacy of such efforts remains to this day, including the then world’s longest line-of-sight microwave telecommunication system, to run from the Turkish capital Ankara through Tehran to Karachi—a distance of some five thousand kilometers.

In contrast, from the early 1990s, Iran and Pakistan had become chief rivals for influence in Afghanistan and pursued policies, which amounted to nothing short of a proxy war between Tehran and Islamabad as each sought to outdo the other in amount leverage they could garner in Afghanistan. Unless Iran and Pakistan revise their Afghan policies, the two countries might soon again be on a collision path, and a crash that could come even sooner depending on the timing and scale of Western withdrawal from Afghanistan.

In other words, the quest for influence in Afghanistan might reemerge with a vengeance. The international nuclear agreement with Iran in July 2015 will not remove all the suspicion and baggage, which will continue to impact U.S.-Iranian relations. But if Washington and Tehran opt to identify and cooperate on common interests, then very few topics are as worthy as collaboration around the future of Afghanistan. At the very least, both sides can work and help the Afghan government to make sure that the emergence of cells of Islamic State in that country are contained. Regardless of both Iran and Pakistan’s complicated relations with Taliban and Al Qaeda, the fight against ISIS and making sure that the movement fails in any attempt to transplant itself in West Asia is one that Islamabad and Tehran share with Washington.

Still, the greatest impediment in closer Iranian-Pakistani cooperation today is that, unlike the 1960s and 1970s, neither Iran nor Pakistan has the other as part of its top-tier foreign policy agenda. It is almost as if managed tension is the best that can be hoped for in bilateral relations. Structural roadblocks are an important constraint. It is the two countries’ respective security and intelligence agencies—and not the foreign ministries—that are the dominant actors in shaping policy toward each other. This in turn makes security-centric considerations dominate the conversation.

In comparison, trade and other sources of economic cooperation are almost entirely absent from the bilateral discourse in any meaningful way, despite ample rhetorical pledges. Among its immediate neighbors, Iran, with its eighty-million-strong population, today trades least with Pakistan, which happens to be by far its biggest neighbor with a 190-million-strong market. If narrow and tactical geopolitical calculations persist in fashioning Tehran and Islamabad’s approach to each other, including on the question of combating extremist Islamists in Afghanistan, then the huge potential for a much broader and multifaceted relations will be left unexplored.

Alex Vatanka is a Senior Fellow at the Middle East Institute in Washington, DC. His book Iran and Pakistan: Diplomacy, Security and American Influence was published in 2015. Follow him on Twitter @AlexVatanka.

Image: An Afghan Local Police recruit fires his AK-47 rifle during a weapons training class in Nawbahar district, Zabul province​. Wikimedia Commons/U.S. Navy