Iranian Foreign Minister Sadegh Ghotbzadeh this morning promised the release "as soon as possible" of American hostages who can prove they were not involved in spying.

Ghotbzadeh said investigation by radical students holding 50 American hostages in the U.S. Embassy here has shown that some of them are not involved in espionage.

"I assure you they will be freed -- no problem," he said.

Ghotbzadeh said their release is "not very far away from now," but he declined to be more specific about the time frame. He also did not say if any conditions are attached to the hostages' release or if they would have to face trial before a revolutionary court before being set free.

He said, however, that those in the embassy "who are guilty of espionage have reached the limit of their diplomatic immunity . . . some of them are not even diplomats."

Ghotbzadeh said he will announce today or tomorrow dates for starting the revolutionary court trials for hostages suspected of spying.

He said the students would not act as judges or prosecutors in these trials but, as the group that has held the hostages in the embassy for the last month and conducted the investigation, they will request the trial.

The students have said they have documents from embassy files that prove three diplomats were spies.

Ghotbzadeh said that in response to criticism arrangements are being made to allow visits to all the hostages. He said the timing will be announced later.

Ghotbzadeh said Iranian authorities had seen no need to allow such visits. But now, he said, everyone is "slandering us around the world" by saying the Americans are being mistreated and are in ill health.

"We decided to let the world see them," he said.

Ghotbzadeh's remarks came a day after Ayatollah Ruhollah Khomeini broadcast an emergency appeal for national unity following a clash between his followers and those of a rival Shiite Moslem leader that sparked massive antigovernment demonstrations in the northwestern city of Tabriz.

The upheaval in Tabriz by supporters of Ayatollah Kazem Shariatmadari threatened to fuel autonomy demands among Iran's largest regional minority. It also risked further complicating moves to defuse the U.S.-Iranian crisis.

Crowds that witnesses said numbered in the tens of thousands took over the government radio and television station and forced the governor general to flee his office through a rear door.

The demonstrations were held to protest an attack by Khomeini supporters Wednesday night on the house of Shariatmadari in the holy city of Qom. At least one of Shariatmadari's guards was killed, and several were injured in the attack.

Shariatmadari, 77, comes from Azerbaijan, of which Tabriz is the provincial capital. Although they have a history of secessionist activity, the Turkish-speaking Azerbaijanis, estimated to number about 12 million or a third of Iran's population, have not so far joined other Iranian minorities who have been pressing demands for regional autonomy since the February revolution.

The crowds in Tabriz were reported by residents there to have shouted, "Death to Khomeini, Shariatmadari is our leadere." By nightfall, there were indications that supporters of Shariatmadari had taken complete control of the city.

Earlier yesterday, Ghotbzadeh said Tuesday's United Nations plea for the hostages' release was "not a resolution condemning us . . . Altogether this resolution is a step forward and a better decision than the previous one."

However, he added, "We are not very satisfied with it because they have not condemned the shah." Ghotbzadeh made no mention of the resolution's demand that the hostages be released immediately and given safe passage out of the country.

In Qom, meanwhile, Khomeini visited Shariatmadari's yellow-brick house for 15 minutes this afternoon and later issued a statement condemning last night's attack, which he blamed on "plotters."

Khomeini added, "I ask all intellectuals, writers and theological students to put aside their quarrels and make the big enemy [the United States] their target. I consider this a religious duty."

Khomeini's clergyman son, Ahmad, who took part in the meeting with Shariatmadari, accused agents of the shah's secret police, SAVAK, and the U.S. Central Intelligence Agency of "sowing discord among Moslems."

Shariatmadari, a more moderate and worldly religious leader than Khomeini, said the attack on his house and the demonstrations that followed have brough about "the very worst" political instability for Iran since the revolution toppled the shah in February.

Shariatmadari and Khomeini are longtime rivals who clashed most recently over parts of the new Islamic constitution promoted by Khomeini.

Shariatmadari's followers object strongly to provisions of the constitution effectively giving Khomeini supreme powers as Iran's political and religious overlord. In addition, some Azerbaijanis share the objections of other regional minorities -- notably the Iranian Kurds, Arabs, Turkomans and Baluchis -- that the new charter fails to meet their autonomy demands.

The constitution was approved in a Dec. 2-3 referendum that was boycotted by members of Shariatmadari's Moslem People's Republican Party, various secular groups and regional minorities.

Diplomatic observers here said open conflict between Iran's two main religious leaders and the possibility of a revolt in Azerbaijan make U.S. efforts to gain the release of its hostages more difficult. These divisions could contribute to the growing anarchy in Iran and tend to disrupt any dealings with a central authority, observers said.

Furthermore, Khomeini's habit in such situations of trying to focus blame for Iran's internal problems on the United States would militate against any lowering of U.S.-Iranian tension.

An article in yesterday's Persian-language paper, Bamdad, when it said the takeover of the U.S. Embassy more than a month ago "prevented the revolution from being diverted from its true course and pumped fresh blood into its veins."

The demonstrations in Tabriz risked spreading demands for antonomy to Iran's most populous provinces, with potentially grave consequences. In all, half of Iran's citizens belong to one minority or another.

In a sign that the Azerbaijani demonstrators reject central government authority, militants who took over the Tabriz radio station broadcast statements in Turkish saying that the authority of Governor General Nureddin Gharavi was no longer recognized in the province. The statements said his successor must be appointed by Shariatmadari.