Underlying all the protests against the shah of Iran and his government is a basic hostility to the very notion of kings imbedded in the brand of Islam practiced by nine out of ten Iranians.

Strict members of the Shiite branch of Islam have always considered the monarchy an offense to their religion, according to followers of Ayatollah Ruhollah Khomeini, the leading Iranian Shiite holy man. He heads the religious opposition to the shah from exile in France.

Through all the phases of Shah Mohammad Reza Pahlavi, both liberal and repressive, the ayatollah, a title that is roughly translatable as sage, has consistently held that the shah's monarchial regime must be abolished.

"Abolition of the monarchy is a total necessity," said the ayatollah in an interview this week. "There won't be any compromise with this regime."

Asked early this year if he would accept the shah's abdication in favor of his son, the crown prince, Khomeini said that the establishment of a new monarchy is "out of the question" and that he opposes "the whole dynasty."

Khomeini's followers say that Shiite opposition to monarchy is not based on texts in the Moslem holy book, the Koran, but is part of the sect's traditions based on its understanding of the way Mohammad and his most imediate followers lived with the people and were spontaneously acclaimed by them.

Khomeini is quoted by a close follower as saying, "The ruler should live like a poor man and be subject to criticism. He should live among the people."

The American-educated follower said that contrary to Iranian government efforts to depict Khomeini as an obscurantist, he has broken with conservative traditionalism. Many Islamic practices, the follower said, are not based on the teachings of the religion but are simply traditional Middle Eastern practices that Khomeini opposes.

A prime example is the traditional Moslem downgrading of women. "Woman is equal to man," Khomeini has said. "Like him, she is free to choose her destiny and her activities."

But Khomeini opposes coeducation as representing temptation that could undermine the family.

The ayatollah insists that all wom-women who come before him, including Western women journalists he has allowed to interview him in France, cover their hair completely as well as all other exposed parts of the body but their hands and faces. The freedom he advocates for women is freedom to be "moral".

"The shah's regime," he says , "busies itself in preventing women from being free by plunging them in immorality."

Khomeini's puritanical approach is in direct contradicition with the shah's grandiose lifestyle. The shah, who calls himself the shahanshah - king of kings - started having real trouble with the religious leaders after he had himself crowned emperor in 1967, and it was redoubled in 1976 when he replaced the traditional Moslem calendar with a new one based on the 2,500-year history of the Persian empire.

Khomeini's strict interpretation of Shiism is a threat not only to the shah, but also the remaining monarchs of the Arab world, including the king of Saudi Arabia, even though the Saudis belong to another puritanical branch of Islam, the Wahabis, that is of relatively recent historical origin.

Although he has never said as much, many observers strongly suspect that Khomeini's dream is to unite in one country the Shiites of all nations. That would pose a threat to Iran's Arab neighbor Iraq, the majority of whose population is also Shiite, and to Turkey and the Soviet Union, which have important Shiite minorities in regions bordering Iran.

The Shiites tend to be looked down upon by other branches of Islam, and Shiism is the religion of the poor in the Moslem world. It is a powerful preacher of egalitariamism, As such, it is in the best position of all the branches of Islam to compete with the appeal of Marxism. Yet, the social concerns of Shiism have also made it vulntrable to the shah's persistent propaganda theme that his opponents are "Islamic Marxists."

In May, in the first interview he ever gave to a foreign journalist, when he was still living in exile at the Shiite holy city of Najaf in Iraq, Khomeini said of the Marxists. "If they came to power, they would establish a dictatorial regime contrary to the spirit of Islam. We are convinced that Islam has the answers to the needs of the people. Our faith is capable of countering their ideology."

During his exile in Paris, Khomeini has been solicited by a steady stream of secular leaders of the Iranian opposition, apparently hoping that some of the magic would rub off on them.

One such was Karim Samjabi, the head of the leftist National Front, a group that claims the heritage of the late premier Mohammad Mossadegh, who nationalized the Iranian oil industry and briefly dethroned the shah in 1963.

"His eminence the Ayatollah Khomeini," said Sanjabi in an interview here at his hotel before flying home to Tehran, "says things in spiritual language that we say in political language."

Sanjabi was arrested at his home in Tehran yesterday shortly before he was to announce a tough anti-shah position in line with that of Khomeini. In the interview here in Paris before he left, he summarized his movement's ideology in three words: "Nationalism, democracy and socialsm."

It is clear that Khoemini could accept all three.

Samjabi, the retired dean of Tehran University's law faculty and Mossadegh's education minister, is a Shiite and a member of the Kurdish national minority of Iran. He expresses great jets the anticlericalism both of the jects the anticlericalism both of the extreme left and the way in which the shah has offended the faith with his modernism.

The National Front leader acknowledges that if elections were to be held immediately, his party could not muster a majority. Control of the situation is in the hands of the religious leaders, he said. "The country can only be calmed if the religious people are calmed down," he said.

Khomeini asserted earlier that he has no intention of heading a new government "or be part of it." But he also distrusts many of the leaders of Iran's political opposition as men who try to use his prestige to further their own ambitious.

The shah has often compared his goals for Iran to the often anticlerical reforms by the founder of modern Turkey. Kemal Atacurk "Ataturk made a lot of his people profoundly unhappy," said Sanjabi, suggesting that many of Turkey's current problems are traceable to Ataturk's efforts to erase his countrymen's religious sensitivities.

Although there are people who are authorized to speak for Khomeini, he insists that his entourage be totally unstructured, so much so that there is a handwritten sign attached to the wall of one of the simple houses where he is staying outside Paris, saying, "Khomeini has no spokesmen."

Asked about this, one of his four helpers who do the work of spokesmen, said "Please just call us aides. Spokesman sounds like part of a heirarchy."

"Khomeini is accepted, not elected," said the aide. "If he made a major mistake, he would be finished with the people in two days." The aide recounted the story of a Shiite holy man whose son had misbehaved, discrediting his father in the eyes of the faithful. "Thirty percent of the Shiites followed that shekh, but almost overmight only five percent were behind him," said the aide.

"A man must set an example," he said. "If he cannot educate his own sons properly, how can be be preach to the people? Khomeini had educated his children perfectly. They are extremely simple."

Khomeini's relationship with his sons and the way in which this is perceived by the faithful is at the origin of an incident which demonstrates that the shah may not fully understand the nature of his people's attachment to the religion.

A year ago, Khomeini's son Mustapha was found dead, with the outward signs of a heart attack, after two [TEXT OMITTED FROM SOURCE] night. Khomeini invoked religious scruples against an autopsy , and powerful Shiite demonstrations against the shah ensued.

Before the traditional 40-day mourning period was over, the state comtrolled press published an attack on Khomeini. This so enraged the Shiite masses that it sparked new and larger demonstrations that were the direct forerunner of the current disturbances.

The shah's appeal has been a deliberate attempt to arouse Iranian national consciousness by recalling the glories of the ancient Persian empire, which was converted to Islam by Arab invaders halfway through his history. Arabs are quick to reject the shah's love of show, which they have traditionally dismissed as a typically Persian rather than Islamic taste for vain glory. The point that both the shah and his Arab critics neglected was how deep-rooted the simple piety of Shiism has become among the Persian masses.

Its most specutacular expression, comes every year on the holiest day of the Shiite calendar, Ashura. On that day, the faithful go into the street to practice mass self-flagellation with chains and whips to punish themselves for not preventing the martyrdon in the 7th century A.D. of Iman Hassein, the father of the last leaders of the faith recognized by the Shiites as legitimate descendants of the Prophet Mohammad.

The shah has failed in his efforts to ban self-flagellation, which takes place through much of the holy month of the emotion-fraught Muhrram, culminating on Ashura.

This year, Ashura falls on Dec. 10. No matter how successful the new military government is in holding down the lid on Shiite revolt between now and then, there are many analysts who believe that the army's capacity to control the population would probably be strained to the breaking point if a new outburst of popular resentment were planned for that date a month from now.