On May 21, an American drone strike ended Mullah Akhtar Mohammad Mansour’s reign as the Taliban’s leader. As The Wall Street Journal first reported, US intelligence officials tracked Mansour to Iran, where he was visiting his family, and then targeted his car as he crossed back over the border into Pakistan. Iran’s foreign ministry spokesman, Hossein Jaber Ansari, quickly denied this version of events, claiming that his country “welcomes any measure in line with bringing peace and stability to Afghanistan.”

However, Zabihullah Mujahid (the Taliban’s chief spokesman) has conceded that Mansour was indeed inside Iran. Dawn quotes Mujahid as saying the Taliban chief crossed the border because of “ongoing battle obligations,” adding that Mansour made multiple “unofficial trips” to Iran.

While many of the details concerning Mansour’s travels remain murky, his presence inside Iranian territory shortly before his death isn’t surprising. Iran has a long history of backing the Taliban’s insurgency against US and allied forces in Afghanistan. Indeed, the relationship between the two former foes is one of the most misunderstood and oft-overlooked aspects of the 9/11 wars.

Iran and the Taliban nearly went to war in 1998 after senior Taliban commanders slaughtered Iranian diplomats and other Shiites in Mazar-i-Sharif. But by late 2001, as the Americans prepared to topple the Taliban’s government, the situation changed dramatically. Outwardly, the Iranians acted as if they just wanted to help rebuild Afghanistan. Western diplomats have praised Iran for its role in the Dec. 2001 meetings in Bonn, Germany, where a post-Taliban government was established. But there is much more to this story. Just before the American-led invasion of Afghanistan two months earlier, the Iranians cut a secret deal with Mullah Omar’s representatives.

One of Omar’s most trusted lieutenants, Khairullah Khairkhwa, helped broker an agreement with the Iranians in Oct. 2001. We know this because Khairkhwa was captured in Pakistan in early 2002, transferred to Guantanamo and then told American officials all about it.

A district court in Washington, DC denied Khairkhwa’s petition for a writ of habeas corpus in 2011. The court found that Khairkhwa “repeatedly admitted” that after the 9/11 attacks “he served as a member of a Taliban envoy that met clandestinely with senior Iranian officials to discuss Iran’s offer to provide the Taliban with weapons and other military support in anticipation of imminent hostilities with U.S. coalition forces.” [See LWJ report, DC district court denies former Taliban governor’s habeas petition.]

According to the court, the Iranians told Khairkhwa and his Taliban delegation that they could provide shoulder-fired missiles (SAM-7’s) and “track all movements by the United States.” In addition, the Iranians “offered to open their border to Arabs entering Afghanistan.” Iran did just that, allowing some al Qaeda members and others to escape the American onslaught.

Joint Task Force – Guantanamo (JTF-GTMO), which oversees the detention facility, deemed Khairkhwa a “high” risk to the U.S. and its allies, in part, because of his dealings with the Iranians. Despite JTF-GTMO’s assessment, and the DC court’s rejection of his habeas petition, Khairkhwa was transferred to Qatar in 2014. He was one of the five Taliban commanders exchanged for Sgt. Bowe Bergdahl.

During the twelve years Khairkhwa was detained in Cuba, Iran continued to collude with the Taliban. The Defense, State and Treasury Departments have all documented the relationship.

In its “Annual Report on [the] Military Power of Iran,” which was delivered to Congress in 2012, the Department of Defense explained that Iran’s support for the Taliban was part of its “grand strategy” to challenge “US influence.” Although there was “historic enmity” between the two sides, the Pentagon said, support for the Taliban “complements Iran’s strategy of backing many groups to maximize its influence while also undermining US and North Atlantic Treaty Organization (NATO) objectives by fomenting violence.”

“Since 2006,” the State Department noted in its Country Reports on Terrorism for 2012, “Iran has arranged arms shipments to select Taliban members, including small arms and associated ammunition, rocket propelled grenades, mortar rounds, 107mm rockets, and plastic explosives.” In 2012, the Iranians “shipped a large number of weapons to Kandahar, Afghanistan, aiming to increase its influence in this key province.”

Foggy Bottom added that the Islamic Revolutionary Guard Corps’ Quds Force (IRGC-QF) “trained Taliban elements on small unit tactics, small arms, explosives, and indirect fire weapons, such as mortars, artillery, and rockets.”

A series of Treasury Department terror designations illuminate the relationship between the IRGC-QF and the Taliban.

In August 2010, Treasury designated two IRGC-QF commanders as terrorists for providing “financial and material support to the Taliban.” A special unit in the IRGC-QF known as the Ansar Corps is responsible for orchestrating attacks in Afghanistan. Nearly two years later, in Mar. 2012, Treasury identified IRGC-QF General Gholamreza Baghbani as a narcotics trafficker. At the time, Baghbani was based in Zahedan, Iran, which is near the border with Afghanistan and Pakistan. From this strategically situated crossroads, Baghbani allegedly oversaw an operation that “moved weapons to the Taliban,” while smuggling “heroin precursor chemicals through the Iranian border” and facilitating “shipments of opium into Iran.” This guns-for-drugs scheme directly fueled the Taliban’s insurgency, according to Treasury.

Treasury wasn’t finished. In February 2014, three other IRGC-QF officials and one of their associates were designated for plotting terrorist acts in Afghanistan and also using “intelligence operations as tools of influence against” the Afghan government. Iran’s duplicitous scheme meant that the IRGC-QF was “currying favor” with some Afghan politicians while targeting other officials for assassination.

In the weeks immediately following 9/11, the Iranian regime and the Taliban met in the shadows. In the 14-plus years since, their relationship has become overt. The Wall Street Journal reported in 2012 that the Taliban has set up an office in Zahedan, which is also a well-known al Qaeda hub. Taliban officials have repeatedly and openly attended meetings in Tehran. And other sources confirm that Iran has often provided the Taliban with arms and training.

Contrary to what Ansari claims, the Iranians don’t want “peace and stability” in Afghanistan – at least not at the expense of achieving their other objectives. They want to force the US out and expand their influence. Given Iran’s enduring partnership with the Taliban, forged in the aftermath of the 9/11 attacks, Mansour’s trips to Iran may have been “unofficial,” but they are definitely unsurprising.

Thomas Joscelyn is a Senior Fellow at the Foundation for Defense of Democracies and the Senior Editor for FDD's Long War Journal.

Are you a dedicated reader of FDD's Long War Journal? Has our research benefitted you or your team over the years? Support our independent reporting and analysis today by considering a one-time or monthly donation. Thanks for reading! You can make a tax-deductible donation here.