Iran's relations with its eastern neighbor, Afghanistan, have been complicated. In 1992, the Taliban, a group of fundamentalist Muslim religious students, began a campaign to take control of Afghanistan from other guerrilla factions. By the middle of 2001, the Taliban had control of almost the whole country. However, Iran offered support to the opponents of the Taliban. The equation of alliances changed dramatically after American and British forces became involved in the fighting in Afghanistan in October, 2001, because the Taliban had harbored Osama bin Laden and allowed the al-Qaeda network to use their country as a headquarters. The Iranian government criticized American involvement in Afghanistan and there was evidence that some Taliban leaders had been allowed to take sanctuary in Iran by the fall of 2002.
The opposition groups supported by Iran took many members of the Taliban militia prisoner; during the latter years of the 1990's members of the Taliban entered Iran to attempt to regain the hostages. Also, the Taliban administration publicly expressed outrage because the government in Tehran would not order release of the Taliban prisoners.
By the end of the 1990's, Iran had placed 200,000 of its soldiers on the Iran-Afghanistan border to protect Iran from Afghani incursions and also to prevent drug traffic that originated in Afghanistanx and Pakistan from crossing Iran on its way to Turkey. The fundamentalist Islamic government of Iran wanted to prevent the smuggling of opium and heroin from these two countries. Iranian troops on the border, however, got into skirmishes with Taliban militiamen.
In 1998 an incident involving Taliban soldiers occurred at Mazar-i-sharif, a holy city for the Afghani people. As many as five thousand civilians were massacred when Taliban and opposition soldiers clashed. The government of Iran also maintained that during this incident the Taliban militia killed eight Iranian diplomats and one journalist. In 1998 President Khatami asked the world community to attempt to resolve problems in Afghanistan, and the United Nations held diplomatic meetings to attempt to bring the problems between Iran and Afghanistan to a resolution.
Although talks between Iran and Afghanistan gave some signs of improved relations in 1999, the Iranians maintained their forces along the border. The defeat of the Taliban in 2001 by combined forces of the Afghan opposition, the Americans, and the British removed a rival government from the region, but it also raised questions about how the Iranians should deal with the new, American-backed government of Afghanistan, headed by Hamid Karzai. Iran responded by attempting to cultivate ties with the Karzai government, while avoiding endorsing the
American support essential to Karzai's survival. At the same time, however, there were also reports that the Iranian Revolutionary Guard in western Iran was permitting Taliban and al-Qaeda fighters to cross into Iranian territory. According to one Afghan warlord, an Iranian official with ties to Ayatollah Khamenei had met with Taliban and al-Qaeda leaders in late 2001 and offered them sanctuary in Iran. While this last claim was open to question, it seemed probable that Taliban and al-Qaeda members had slipped into Iran and that they would not have been able to remain there without at least some tacit cooperation from the Iranian government.