Shortly after the fall of the Iranian monarchy earlier this year, officials at a Saudi port discovered in the arriving cargo a cache of Soviet submachine guns and Bulgarian pistols.

The discovery, which was not publicly announced, touched off a wave of concern and a customs crackdown that still continues.

Containerized cargoes at Saudi ports have been opened and searched. Building supplies, automobiles and even foodstuffs have been subject to unusually rigorous inspection.

A few days ago even crates of oranges were unpacked, orange by orange, in the search for weapons, according to a foreign businessman.

The Saudis profess not to be worried about a possible spread of Islamic radicalism from Iran, which is just across the Persian Gulf, and they say with justification that internal conditions in the desert kingdom are far more stable than in Iran.

Nevertheless, this country's leaders are leaving no stone unturned to make certain that the kind of revolution that shook Iran does not happen here.

Internal security is no easy task in Saudi Arabia, in view of 1,000 miles of coastline, 800,000 Islamic pilgrims coming yearly from foreign countries to visit Mecca, and close to 1.5 million foreign workers present in the labor for the native population of around 5 million Saudis.

"There is a completely different situation here than in Iran," said Minister of Information M. A. Yamani, in a comment echoed by other Saudi officials and other from several walks of life. Among the differences cited are:

The strong tradition of religious orthodoxy in Saudi leaders have not departed in any conspicuous fashion.

"We see no threat from an Islamic movement, and on the contrary believe that the stirrings of Moslem sentiment and devout practices are an endorsement of our views and efforts," said a senior Saudi official.

There has been no conflict between clergy and the leadership of the state in Saudi Arabia to parallel that between the ayatollahs and the shah in Iran. Some years ago the late King Faisal assumed a high post of supervision over religious matters on behalf of the monarchy. Saudi leaders, unlike the shah, are religious and are perceived to be by their people.

The great majority of Saudis follow the Wahabi branch of Islam's Sunni sect. Most Iranians are of the Shiite sect, Islam's other major movement. The Saudi govenment has been very conscious since events in Iran, of the 100,000 to 200,000 Shiite Moslems here, mostly in the eastern part of the country.

Economic and social conditions are far better for the majority of people in Saudi Arabia than in Iran, which has a population of about 35 million and a far greater degree of Westernization.

A Saudi who spent several years in Iran was appalled at the degree of drug addiction and alcoholism there, as well as the extent of social disintegration. "If you buy a car in Iran, they put an import tax on it to make it more provides a subsidy to make if affordale," he said.

Government services are free in Saudi Arabia. Income taxes were abolished several years ago. Staple foods are heavily subsidezed by the state.

Access of Saudi citizens to King Khalid, Crown Prince Fahd and other members of the royalty in high posts is a safety valve against popular discontent.

Saudi Arabia is an absolute monarchy with no written constitution or elected representatives. The institution of the majlis, the informal meeting at which petitions and appeals for favors can be made to high officials, is its major gesture to democracy. The king, crown prince and other Saudi leaders see citizens at majlis sessions several days a week.

Petitions or complaints that are addressed to the king cannot be intercepted by royal court officials, Saudi say.

Recently a Saudi driver who had lost his job at the kingdom's air base at Dhahran complained to the king, touching off investigations by two inspection teams from Riyadh. The teams reported that the man was properly fired because of a lack of work for him to do, but the king ordered nonetheless that he be given government support until he could find a new job.

The major threat from within the system would seem to be the possiblity of a coup by officers or enlisted men of the growing Saudi military forces. However, Saudi military officials denied reports of discontent in the rank.

A Saudi Air Force commander, one of 15 members of the royal family serving in the 15,000-man Air Force said the personal contact and ties are so close that it is unlikely that any plot within the military would escape detection.

A further check is provided by the organisation of the Saudi military into two separate compartments - the 45,000-man regulars headed by Prince Sultan, corganized around modern military lines, and the 35,000-man National Guard headed by Prince Abdullah. It is organized on tribal lines.

The major threat from outside the system is the presence of so many foreign workers. They are closely watched by the Saudis, and any suspected troublemakers are sent out of the country.

The largest single group of foreigners is from Yemen, on the southern border of Saudi Arabia. This is one reason the Saudis have been extremely sensitive to the growing Soviet influence in South Yemen and the presence there of Cuban advisers.

Considering the vast wealth of Saudi Arabia and the relatively small number of Saudis act and feel extremely vulnerable. Any sign of a security threat, as in the case of the smuggled weapons, is taken very seriously. CAPTION: Picture, Foreign workers, such as these on a Saudi construction project, are closely watched for signs of troublemaking. By Don Oberdorfer - The Washington Post