U.S. experts on Iran said yesterday the clashes involving Iranian pilgrims in Mecca and mob attacks on the French, Saudi Arabian and Kuwaiti embassies in Tehran are only the most recent signs of a notable "swing of the pendulum" in the past several months toward greater Iranian radicalism and international isolation.

The Iranian shift, according to Profs. R.K. Ramazani of the University of Virginia and James A. Bill of the College of William and Mary, roughly coincides with and may have been affected by increasing U.S. military activity in the Persian Gulf, especially the provision of U.S. naval escorts for Kuwaiti ships under the American flag.

The State Department, in a statement yesterday, rejected Iranian charges of U.S. responsibility for the disorders in Mecca. Calling the charges "totally baseless," the statement said they were designed by Iran "to inflame passions and escalate tensions in support of Iran's political aims to destabilize the region."

The new outbreaks of violence involving Iranians came at a high point of U.S.-Iranian tension over the reflagged ships, one of which on July 24 hit a mine believed to have been planted by Iran, and while Senate and House committees are conducting televised hearings into earlier secret shipments of U.S. arms to Iran.

As in 1979-81, when revolutionary Iran seized and held hostage American diplomats, radical fervor in Tehran could have important consequences in the outside world.

And as in the earlier period, U.S. private experts and government officials are uncertain to what extent the Iranian fanaticism now on view is a deliberate instrument of policy wielded by Ayatollah Ruhollah Khomeini's inner circle and to what extent it is a mostly spontaneous reaction to external and internal events.

After several years of intense emotion and radicalism before, during and immediately following the 1979 Islamic revolution in Iran, Tehran in the early and mid-1980s seemed to mute its extremism in a pendular swing toward greater pragmatism, according to several experts.

Iran worked for several years to improve its relationships abroad, including with Western European nations and Saudi Arabia as well as (through clandestine contacts) the United States, but in recent months has seemed to reverse course.

West German and Italian diplomats were expelled from Tehran recently because of perceived insults to Khomeini in their countries.

The British diplomatic presence in Tehran was virtually closed down last month in a dispute that escalated from the British arrest of an Iranian diplomat in Manchester on shoplifting charges.

A French government demand to question a translator at the Iranian Embassy in Paris about terrorism escalated to the blockading of the Iranian and French embassies in each other's capitals, an Iranian gunboat attack on a French freighter in the Persian Gulf and the breaking off of diplomatic relations between the two countries July 17.

Ramazani, the author of "Revolutionary Iran," a recently published book about effects of the Iranian revolution, said that for months after the disclosure last November of U.S.-Iranian secret contacts, public statements of Iranian leaders "still retained the option of an opening to the United States."

However, U.S. plans to reflag and provide naval escorts to Kuwaiti tankers in the Persian Gulf elicited a hostile Tehran reaction, said Ramazani, including increasingly militant rhetoric against the United States by nearly all Iranian leaders.

"What the United States has done seems to have given a new life to the most revolutionary elements of the Iranian power structure," Ramazani said. He added that "the clock's hands seem to have been set back to a degree of radicalism that had been on the decline."

Bill, who is completing a book on Iran and the United States, said the situation is "very dangerous, even explosive." He described Iranians as "a tense, angry people" and, increasingly, "sullen and desperate."

"There is absolutely no doubt there had been a period of relative pragmatism . . . but now it's back to the extremist phase," Bill said.

Bill said the growing U.S. involvement in the Persian Gulf, highlighted by the U.S. reflagging of Kuwaiti ships, was seen in Tehran as aimed against it. "Western ships going up and down the gulf, superpowers aligned against them -- such things make {the Iranians} feel besieged and threatened," Bill said.

The annual pilgrimage to Mecca, birthplace of Islam's Prophet Mohammed, is an occasion of great importance to Iran's Islamic Republic.

After disputes between Iranian pilgrims and Saudi authorities in the years just after 1979, authorities in the two countries seemed for several years to have come to terms on this and other issues.

The Saudi and Iranian foreign ministers exchanged visits to each other's capitals in 1985 and the authorized number of Iranian pilgrims was increased from 100,000 to 250,000.

The Saudi authorities maintain the pilgrimage is a strictly religious event, but the Iranians insist it is also political.

On July 14 the head of the Iranian delegation to the pilgrimage announced a plan to stage two massive demonstrations at holy sites, despite a Saudi ban on political activities.

Khomeini, in a message to Iranian pilgrims broadcast Thursday, instructed them to "echo the crushing slogan of the disavowal of pagans and apostates of world arrogance, headed by the criminal U.S.A." The message also attacked Kuwait and said the United States has suffered "defeat" in attempts to escort reflagged ships in the gulf.