Iran is another Middle East nation where the implications of the Lebanese hostage crisis and the manner of its resolution will be intensely debated. The perception of who won and who lost will not only influence future Iranian policy in Lebanon; it will also affect the balance of power between moderates and radicals within Iran's own ruling coalition.

Iran has denied any link to the hijackers of TWA Flight 847. But it is no secret that Iran has supported and funded the more radical Shiite groups in Lebanon. Iranian influence in the Bekaa is reinforced by a contingent of 500 revolutionary guards who arrived in 1982, with Syrian acquiescence, ostensibly to fight the Israelis.

The guards, who help train Shiite militia, have made Baalbek a center of Iranian influence. Hussein Musavi, the leader of the radical Islamic Amal, a breakaway group from the mainline and more moderate Amal movement led by Nabih Berri, is an Iranian prot,eg,e.

Iran has close links with the influential Shiite cleric of Beirut, Sheikh Muhammed Hussein Fadlallah, a spiritual leader of Hezbollah, the Party of God. Fadlallah greets visitors flanked by a large portrait of Iran's leader, Ayatollah Khomeini. Like Musavi, he was recently a guest in Tehran, where he met with leading Iranian officials.

In the South, around Tyre, Shiite village clerics draw inspiration from the Iranian example. Desiring to appeal across Moslem sectarian lines, Iran has also cultivated Sunni clerics, such as Sheikh Maher Hammoud in Sidon and Sheikh Said Shabaan in Tripoli.

The radicals vie with the moderates of Amal for the support of Lebanon's Shiites. They dream of establishing an Islamic state in Lebanon, on the Iranian model.

Iran encourages these aspirations. Its activities in Lebanon have been part of a larger effort to "export revolution," to encourage the establishment of Islamic rule throughout the region. The Islamic republic has poured money into propaganda, meddled with subversion in Bahrain and Kuwait and tried to use pilgrims to the Holy Places in Mecca for political agitation against the Saudi state. It has established a number of organizations, such as the World Congress of Friday Prayer Leaders, to work for the establishment of Islamic governments throughout the Moslem world.

But this policy has recently begun to fray at the edges. Rising dissatisfaction in Iran with clerical rule, uneasiness at the seemingly endless war with Iraq and the faltering economy exert pressure for less revolutionary turmoil at home and for a less revolutionary image abroad. Iran's rulers have discovered that they too have to sell oil and to have access to Western machinery, technology and credits.

More importantly, while the United States has persuaded its allies to limit severely arms deliveries to Iran, Iraq has secured sophisticated aircraft and weapons from France and the Soviet Union. Iran's cities are now vulnerable to Iraqi aerial bombing.

Last year, in what has since become known as Khomeini's "open window" foreign policy, the Iranian leader berated those critical of normalization of relations with Western Europe. In May the Saudi foreign minister became the first ranking Saudi official to visit Iran since the revolution. There is an attempt to repair relations with the other Persian Gulf states.

Publicly, and at least in the Gulf, Iranian officials are trying to distance themselves from terrorist acts. They blamed the recent attempt on the life of the ruler of Kuwait and bombings in Saudi Arabia on enemies who want to undermine Iran's relations with Arab "brothers," the same "brothers" who only recently were castigated as reactionary, imperialist stooges.

Advocates of punishment for states that support terrorism might note that the apparent change of heart in Tehran came about as a result not of instant retaliation but of a slow squeeze: denial of arms, resupply of Iran's enemy, diplomatic isolation, mounting economic problems.

Nevertheless, some in Iran's ruling coalition still believe in active export of revolution. The anti-American rhetoric remains intense. The government to a large degree is a prisoner of its revolutionary posture.

Moreover, Khomeini remains powerfully attracted by the possibility of seeing an Islamic government established in Bagdad. Even as the prospect of exporting revolution to Gulf states has dimmed, Lebanon, with its large and dissatisfied Shiite community, has appeared a more attractive arena for Iranian efforts.

During the hostage crisis, however, Iran maintained a low profile. It was Syria and its allies, not Iran and its prot,eg,es, that called the shots. U.S. threats of retaliation have so far lacked conviction, but they do not go unheeded in Tehran. Moreover, Iran in Lebanon cannot stray far from Syrian policy. For Iran, the priority foreign policy issue is the war with Iraq, and in the prosecution of the war, Syrian support is critical.

Thus after some initial hesitation, the influential speaker of Iran's parliament, Hashemi Rafsanjani, announced that while Iran sympathized with the grievances of the hijackers, it condemned the hijacking itself as an act of terrorism. Significantly, the announcement came while the speaker was in the Syrian capital.

This latest turn in Iran's zigzagging foreign policy is in keeping with the more moderate line adopted by the Islamic republic in the Persian Gulf. It hardly means Iran will cease supporting Lebanon's radical Shiites, although it implies that Iran is having second thoughts about identifiying itself with groups that employ terrorist tactics.

Iranian foreign policy, mirroring the internal divisions in the government, may continue to be characterized by an unstable mix of both radicalism and moderation. A clearer policy will emerge only when the debate between these factions is resolved. That, in turn, depends on whether Khomeini's men conclude, as they have in the case of the Gulf, that exporting revolution is an excessively costly enterprise.