The mounting opposition to Shah Mohammed Reza Pahlavi, which led yesterday to Iran's worst civil disturbances in at least 15 years, is mainly the product of a dictatorial leader trying to modernize his country while at the same time holding on to authoritarian power.

Over the past few years, analysts believe, the shah's grandiose plans to use the country's oil wealth to wrench the country from poverty to a Western level of development have left a residue of unfulfilled expectations among some while challenging the extrenched beliefs of others.

To Americans, leftist students may symbolize the opposition to the shah, but in the current unrest, the students are playing only a minor supportive role.

Ironically, the leadership of the opposition comes mainly from conservative Islamic mullahs who oppose the governments' Westernization of the country and expropriation of lands held by mosques.

Many of the policies of the religious leaders are anathema to the students, and the diverse dissident elements are held together basically by their opposition to the shah.

The shah's difficulties with the country's Moslem leadership go back to at least 1963 when religious leader Ruhollah Khomeini led an abortive coup and was sent into exile in Iraq. Since then there have been sporadic disturbances, but until this year there was no indication that they were a threat to the government.

Repeatedly this year tens of thousands of persons have openly demonstrated against the shah - something that was unheard of in the authoritarian state as little as a year ago.

In a sense, even the shah's successes have rebounded against him.

The abject poverty of the masses little more than a decade ago has been eased and a growing middle class has taken root. The trouble is that while the per capita gross national product quadrupled in the last four years to $1,900, the gap between the rich and the poor has widened.

One 1973 study revealed that the top 10 percent of the population accounted for 34 percent of spending compared with 2 percent for the lowest tenth.

The aspiring middle class, on the other hand, has found that the dreams of a Western standard of living are slow in coming and the economy, overheated by more than $100 billion in development programs, has declined, leading to growing unemployment.

Tehran, which has almost doubled in population to about 4 million in the last decade, has become a city clogged with cars and pollution and still lacking a sewage system.

On top of all these problems Iranian society, for centuries controlled by the conservative Shiite wing of Islam, has been thrust into the 20th century by the growing influence of the West. In the last decade, the number of foreigners has increased markedly, many bringing along free-spending habits and a way of life alien to the average Iranian. There are now well over 30,000 Americans in Iran now compared with about 5,000 in the mid-1960s.

As the oil-based economic boom drew thousands of Iranians to the cities, many discovered that the shah's dream of making Iran the economic equal of France or Britain by the end of the century was not working for them. Unemployed or under employed, they live on the margin of the booming society with Islam being the main unchanging influence in their lives.

All this provided fertile ground for the religious leadership to mount its offensive against the shah, who authoritarian power, despite his Westernization plans, has grown markedly in recent years. The shah, 58, assumed the throne in 1941 but only began to accrue real power after the overthrow of Prime Minister Mohammed Mossadegh in 1953.

The anti-shah demonstrations began in January when nine residents of the holy city of Qom were killed in clashes with police. Since then they have spread gradually to most major centers in the country, including Isfahan, Tabriz, Abadan and Meshad.

Violence usually erupted in 40-day cycles, geared to the Islamic 40-day mourning period. The government says about 300 persons have been killed in eight months of demonstrations; dissidents say the toll is closer to 1,000.

The worst single death toll, however, did not come in clashes with troops or police. A theater fire in the oil port of Abadan killed at least 377 persons last month.