Foreign Minister Sadegh Ghotbzadeh today promised that Iran would begin supplying arms to Afghan rebels if negotiations fail to get the Soviet Union to withdraw its nearly 100,000 combat troops from Afghanistan.

"We are trying to make arrangements for the withdrawal through peaceful means. But if that does not work, it is our duty to give assistance of any kind to the freedom fighters so they can rid themselves of foreign occupation, which cannot be tolerated by us," Ghotbzadeh told a press conference at the Islamic foreign ministers' conference here.

Earlier, in a conference speech, he asked foreign ministers from 38 Islamic states and the Palestine Liberation Organization to join Iran "in general condemnation of the Soviet aggression in Afghanistan."

For the second time in two days, Ghotbzadeh declared strong support for the Afghan rebels, whose cause he said was as important to his country as the rights of the Palestinians, which traditionally has been the most important Islamic issue.

"This represents a shift for Iran; it has never been so confrontational before with the Soviet Union," said a senior diplomatic observer here.

Ghotbzadeh also attacked the United States, though in more moderate tones than he has used in the past, for what he said were past aggressions against Iran and for its failed attempt to rescue the U.S. hostages last month.

He asserted that Iran has continued "to exercise considerable restraint" even when provoked by the United States. He added that European participation in an economic boycott against Iran will have little effect and that Iran would not try to retaliate against the European nations that have imposed sanctions against it.

Ghotbzadeh said he expected that many companies in the boycotting European nations would find ways to trade with Iran. He claimed that 1,200 American firms contacted Tehran to see how they could continue to do business despite U.S. sanctions.

The Iranian foreign minister insisted that Iran would never bow to pressures to free the American hostages.

"The concept of martyrdom is central to the comprehension of our revolution," Ghotbzadeh explained. "We were able to display this belief in the case of hostage-taking in the Iranian Embassy in London. We are equally able to display it on a much wider dimension if such opportunities arise."

Nevertheless, some Islamic states have joined efforts to persuade Iran to release the hostages. Although these pressures are not surfacing publicly, members of at least eight delegations have said they are trying to push Ghotbzadeh to settle the hostage question because they feel it is a blot on Islam and is diverting Iran from more important issues, both domestically and on its border with the Soviet Union.

Iran, for instance, appeared to be moving closer to Moscow as a result of a Soviet offer to let goods from Europe move across its territory to beat the American boycott and a possible naval blockade.

At this meeting Iran clearly signaled the Soviet Union that it might accept help, but in no way would move into the Soviet camp. Knowledgeable diplomats here said Iran must have infuriated and embarrassed the Soviets by pulling Afghan rebel leaders into its delegation Sunday so they could appear on the conference floor.

To counter the Iranian move, the PLO today asked that the Soviet-installed Afghan government of Babrak Karmal, suspended from the foreign ministers' conference at a special session in January, be reinstated as a full member.

Ghotbzadeh said most Islamic states -- except those that he asserted were in America's pocket -- are supporting Iran against the United States. He accused Iraq, an Islamic state whose delegation sits directly across the aisles from Iran, of instituting "a treacherous policy of animosity" against Iran.

Iraq, which has been engaged in border skirmishes with Iran and has been accused of backing the takeover of the Iranian Embassy in London, denied Ghotbzadeh's charges in a rebuttal speech.