The fall from power of Shah Mohammad Reza Pahlavi has profoundly shocked most Arab states and is setting off a wave of self-scrutiny across the Middle East, from conservative monarchies to socialist "republics."

The developments in Iran have prompted many Arab leaders to reconsider their own positions, questioning whether their authority may not be more fragile and their power bases smaller than they thought, according to Middle Eastern diplomats and political observers.

Practically the only Arabs who welcome the Iranian developments are the distant and radical Libyans, the Marxist South Yemenis and the stateless Palestinian guerrillas, the sources said. For various reasons, the others are generally worried.

"It appears that a geopolitical shift is under way that is making the Arab countries completely reassess their own positions and their relations with each other," a diplomat said.

Jordan, the Palestine Liberation Organization and Iraq are all mending fences with each other, and Syria and Iraq are talking about unifying their two countries, long bitter rivals. Diplomats say the main impetus for this has been the Camp David accords and the common "threat" to the Arabs of an Egyptian-Israeli peace agreement.

But the events in Iran -- the rise in Islamic idealism, the crippling strikes, the overthrow of a strong ruler and the threat of radiclization -- have reinforced the tendency toward closer inter-Arab relations, the sourcs say.

"Everyone here was genuinely shocked by what happened in Iran," said a diplomat in Amman. "They thought the shah was firmly in control."

"The passing of a monarch is much more of a shock in a place like this," said another. The realization that the power of the people can topple a strong rule has hit the hardest."

Political analysts do not consider Jordanhs King Hussein to be directly threatened by the Iranian developments, although they say his close personal relationship with the shah has not done him any good.

"The king is considered far more legitimated than the shah ever was," a diplomat said. Whereas the shah's father, an army officer, declared himself Iran's ruler after seizing power in a coup, the authority of King Husein I Ibn Talal is based on hisheritage as a Hashemite descendent of the Prophet Mohammed.

The king also a much more personable man, spends a good part of his time with his troops and frequently mixes with his subjects, especially in the provinces. although he is not without enemies, he seems generally well-liked and respected by the population.

But as ruler of a population that even without the Israeli-occupied West Bank, is about 50 percent Palestinian, Hussein faces the constant prospect of internal unrest lined to the Middle East crisis, analysts say.

One indication that the lessons of Iran are heeded is the current trial on embezzlement charges of a former ambassador to London who reportedly had been fairly close to Hussein.

Sources see the prosecution of a loyal supporter of the king as a sign of change, saying tha in the old days the case probably would not have made it to court.

Much of Jordan's anxiety over the Iranian unrest stems from the kingdom's close relationship with the Arab monarchies of the Persian Gulf, political analysts said. Trained manpower is the country's top export, and Jordanian military personnel, economists, teachers and even judges are hired out to help various Gulf states in different fields.

"There's a tremendous fear that the unrest in Iran will spill over to the Gulf states and that the domino theory will begin from there," an analyst said.

In turn, the main worry of the Persian Gulf sheikhdoms is that growing radical tendencies in Iran, especially in its southern oilfields, will influence their large foreign populations.

Neighboring Kuwait is inhabited about 50 percent by foreigners, including an estimated 200,000 Palestinians. The population of the United Arab Emirates is said to be about 85 percent foreigners.

Saudi Arabia also has a large proportion of imported laborers and has expressed grave concern over the Iranian developments.

According to knowledgeable diplomats in Tehran, only a few months ago the Saudis were secretly glad to see the shah's awesome military power being taken down a few notches. Their cries of alarm, these sources said, seemed mainly intended to persuade Washington of their need for stronger defense commitments. But now the Saudi alarm is real, these sources say.

"The Saudis didn't want Iran to be so strong as to threaten to take over the Gulf," a diplomat in Amman said. "But their ambivalence turned into genuine concern when it became clear the shah's power was not only diminishing but disappearing and leaving a pwer vacuum, and that the United States couldn't do anything about it."

The source added, "The Saudis really didn't want the shah to go.They just didn't want him to be so uppity."

The concern also stretches to the Arab republics run by authoritarian Baath Socialist Parties in Iraq and Syria, whose relations with each other are warming after a 12-year feud.

"What happened in Iran gives all kinds of groups ideas that it is possible to overthrow a powerful leader," an analyst said.

"The Syrian leadership is shaken up to the extent that [President Hafez] Assad's power base is as samall as the shah's. He's got a bunch of toughs running Damascus headed by his brother [special forces commander Rifast Assad] and he comes from a minority [the Alawite Moslems] that is disliked."

The Iraqi leaders are said to be especially concerned that their neighbor's convulsions will incite new revolt by the Kurdish tribes that straddle the border with Iran and stir up Iraq's large Shiite Moslem population which shares the faith of Iran's potent religious opposition.

Potential repercussions of the shah's departure may also extend to states ranging from Oman to Lebanon, political observers believe. In Oman, Sultan Qaboos could well face a resurgence of guerrilla activity which the shah's forces helped him crush four years ago in Oman's southern Dhofar Province bordering Marxist South Yemen.

In Lebanon, which has a substantial Shiite population, demonstratiors recently took to the streets of Beirut to praise Ayatollah Ruhollah Khomeini and call for the return of their leader, the Imam Moussa Sadr.

Right-wing Lebanese Christian leaders, meanwhile, expressed alarm over the shah's fall. One of them, Camille Chamoun, blamed "public chaos nurtured by the bigotry of religious leaders" who, he said, "want to take Iran back hundreds of years into the past."

Somalia, which has received financial assistance and, reportedly, some small arms deliveries, from the shah, may not be able to expect such support in the future in its face-off with the Soviet-backed regime in neighboring Ethiopia.

Nor are the leaderships of North Yemen, Egypt, Tunisia and Morocco any more financially or politically secure now that the shah has gone. The Egyptian government, which welcomed the monarch enthusiastically after his flight into exile, had benefitted from Iranian foreign aid and special oil deliveries on long-term credit, both of which have already dried up.

Israel, vilified by anti-government protesters during Iran's year-long crisis, cannot expect any more Iranian oil deliveries either.

That is one reason for the rejoicing over the shah's downfall by the Libyans, South Yemenis and the PLO. The latter, gratified by the pro-Palestinian and anti-American sentiment of many youthful Iranian demonstratiors, has also moved to take some of credit recently by publically disclosing that it has been training Iranian guerrillas over the years