SINCE the collapse of the USSR in 1991, Iran and Pakistan have struggled to dominate trade links with the ex-Soviet states of Central Asia. Both countries believe they can provide the region's Muslim republics with access to international markets.
Iran borders two of the republics and boasts year-round ports on the Persian Gulf. Pakistan is cut off from the region because of civil war in Afghanistan. Now, says the Iranian government, Pakistan is trying to install a friendly government in the Afghan capital to ensure an open road to Central Asia.
''Pakistan doesn't want friction with Iran, but it does want a trade route to Central Asia,'' said an Iranian political analyst who asked for anonymity. ''Pakistan feels it has more political will to achieve [stability] in Afghanistan than Iran.''
Iran is allied with Burhanuddin Rabbani, who became Afghanistan's temporary president soon after the mujahideen, or resistance fighters, seized Kabul, the capital, in 1992. Since then, the mujahideen have split into various ethnic and religious factions, several of which oppose Mr. Rabbani's rule.
Pakistan first became involved in Afghanistan in 1979 when the former Soviet Union sent troops to support a Communist government in Kabul.
Pakistan's border town of Peshawar became the main base of the anti-Soviet opposition. Even the United States channeled millions of dollars in military aid to the rebels through Pakistan; Western diplomats say that Pakistan's intelligence service retains much of its influence within the country.
Foreign observers say that Iran wants to prevent Pakistan from developing close links with Central Asia, but it also wants to repatriate 2 million Afghan refugees who fled across the border to avoid the Soviet invasion. So long as fighting is continuing in Afghanistan, the Iranian government cannot send the refugees back.
''The question is, how far would Iran go to block Pakistan in Afghanistan?'' asked a senior United Nations official in Iran. ''Would Iran do whatever it could to block them, or would it seek peace? The pressure of the refugee issue might come into this equation.''
Some Iranian analysts say the government has already decided that peace at any cost is the best option. ''All Iran wants now is stability in Afghanistan so they can kick the Afghan refugees out,'' said Hassan, an ex-mujahideen fighter now living in Iran.
In the last few months, a new armed militia known as the Taliban has appeared here. Ostensibly a group of Sunni Islamic students from religious schools in southern Afghanistan and Pakistan, the Taliban has quickly captured large parts of the country, and its forces are poised to attack Rabbani's government.
''The Iranians believe that Pakistan is using the Taliban militia to secure its access to Central Asia,'' said a European diplomat in Iran. ''If Taliban overthrows the Afghan government, Pakistan could install its own people in Kabul.''
Iranian government ministers are reluctant to accuse Pakistan directly, but they suspect that Pakistan's intelligence agency has provided training and military equipment to the Taliban.
''It seems unusual that a group of students has become such a militant power overnight after several years of fighting,'' said Alaeddin Boroujerdi, Iran's deputy foreign minister for Asia-Pacific affairs.
Iranian journalists, however, go much further in accusing Pakistan and even the United States. ''Taliban was originally a joint venture between the Pakistanis and the Americans at the end of the Soviet war,'' said a prominent newspaper editor in Tehran. ''With American orders and Pakistani expertise, they're carrying on the fight.''
In early September, Taliban seized Herat province, which borders Iran, and forced the governor to flee to the Iranian town of Mashhad. Not even a November visit to Tehran by Pakistani Prime Minister Benazir Bhutto could convince Iran that Pakistan had not provided help to Taliban's soldiers.
Although Iran is angry at what it sees as Pakistan's involvement in the internal affairs of Afghanistan, it appears to be more concerned about repatriating its large refugee population.
Some Iranians say that Iran would be willing to accept Taliban's control of Herat if it allows the refugees to return. ''The Iranian government knows that Rabbani can't control the whole country,'' Hassan said. ''They've already offered wheat and oil to Herat since Taliban took over the town.''
Government ministers confirm that initial contacts with Taliban's leaders have been made. ''We have a consulate open in Herat and we have had negotiations,'' said Deputy Foreign Minister Boroujerdi.
Others say that the Iranian government has ceased to care who controls Afghanistan, so long as it can return the refugees safely as soon as possible. Achieving stability in the east would also allow Tehran to curb a thriving cross-border drugs trade and concentrate on developing its own trade ties within Central Asia.