Iran actively intervened to help resolve the Beirut hostage crisis by ordering its recalcitrant Lebanese Shiite allies to release their American hostages, according to U.S. officials, who said previously they doubted that Iran had a role in planning the Trans World Airlines hijacking.

The key Iranian intermediary, officials said, was parliament Speaker Ali Akbar Hashemi Rafsanjani, who was in Damascus during the crisis and met with leaders of the Iranian-backed Shiite extremist group Hezbollah to tell them to cooperate in ending the ordeal.

The hijacking June 14 came at an extremely awkward moment for Iran, which had recently launched a diplomatic campaign to break out of its isolation and present a more "moderate" image to the world, according to the officials.

Rafsanjani, touring Arab and Asian nations to promote Iran's new image, in Damascus summoned several Hezbollah and other Shiite leaders for what one U.S. official called "tough talk" about releasing the hostages.

"I don't think they knew about the hijacking in advance. I think they were caught off guard," a U.S. official said of the Iranians. "It was a terrible time for Rafsanjani."

Secretary of State George P. Shultz said in a television interview Monday that the United States had "no direct evidence of Iran being directly involved in the inception of the hijacking." He mentioned no specific Iranian role in helping Syria gain the release of the 39 hostages, but other U.S. officials did.

Rafsanjani acted partly out of concern for maintaining relations with Syria, according to U.S. officials. Syria has supported Iran throughout its long war with Iraq and given the Iranian Revolutionary Guard several bases from which to operate in Syrian-controlled areas of Lebanon's Bekaa Valley.

"A confrontation with Syria is not what Iran needs," the U.S. official said.

This U.S. assessment of Iran's unexpectedly helpful role, conveyed to reporters by top administration officials in recent days, conflicts sharply with British press reports and allegations by Sen. Jesse Helms (R-N.C.) that Iran was directly responsible for the incident.

Shultz and other officials have dismissed these reports but have been more guarded in commenting about other reports implicating several top officials of Nabih Berri's Amal militia in the hijacking.

Zeev Schiff, respected military correspondent of the Israeli daily Haaretz, reported Tuesday that two top Berri aides planned the hijacking in a maneuver aimed at undermining Berri's authority. Schiff named the two as Aaakal Hamiyeh, Amal's Iranian-trained military commander in west Beirut who is better known as "Hamza," and Mustapha Dirani, head of the militia's security branch.

The two were among Hezbollah and other Lebanese Shiite leaders who met Rafsanjani in Damascus June 24. After that meeting and talks with Syrian President Hafez Assad, Rafsanjani publicly dissociated Iran from the hijacking and said that, had it known in advance, Iran would have acted to avert the incident.

Later, in China, Rafsanjani denounced the hijacking in what U.S. officials have interpreted as a message to Hezbollah holdouts refusing to turn over four hostages to Amal.

U.S. officials added, however, that they had no hard evidence that Iran had stopped training or indoctrinating Lebanese Shiites in special camps in Iran and the Bekaa Valley in eastern Lebanon, where Iranian Revolutionary Guards operate. Hezbollah and other Shiite extremist groups have headquarters there.

Last Thursday, Helms placed in the Congressional Record a long report compiled by his staff that detailed alleged direct Iranian involvement in planning the hijacking, including training one of the terrorists, Ali Atwa, in two Iranian camps for three weeks in May.

The report said Atwa lost a brother in fighting against Israel in March and was on a pilgrimage to Iran May 5 with families of 100 Lebanese martyrs when he was recruited. He was trained for three weeks in a center near Mashhad in northeast Iran where two disabled Iran Air Boeing planes are used to familiarize "hijacker-trainees with the aircraft," the report said.

Subsequently, according to the report, he attended another center for "suicide squads" at Manzarieyeh Park close to Iranian leader Ayatollah Ruhollah Khomeini's residence in Tehran before returning to Lebanon via Damascus June 8 or 9.

The London-based Economist Foreign Report recently made similar allegations against Iran, tracing Iranian planning for the hijacking to early April, when it said the Iranian ambassador in Damascus, Ali Akbar Mohtashami, was summoned to Tehran to plan "a new terror campaign." The Report is known to be close to British intelligence.

U.S. officials said they had no reason to believe these reports.

According to observers, Rafsanjani's recent peacemaking gestures are also related to the upcoming Iranian presidential election, which is scheduled to be held in late July or early August.

Iranian newspapers have carried reports in the last two weeks that the parliament speaker is expected to announce his candidacy soon, although his office has not commented on the reports.

Rafsanjani has emerged as a leader of the "moderate" Iranian faction that is trying to find a peaceful solution to end the war with Iraq.