With the blue waters of the Persian Gulf to starboard, and the sand of the desert beneath, the Saudi Arabian Air Force helicopter flew over oil terminals, the nearly-completed naval base, and on to Jubail, the huge new industrial complex which the Saudis are creating from nothing.

The sights on this short journey last month seemed to symbolize the confidence and optimism of the present Saudi regime.

Despite the recent attack on the Great Mosque of Mecca by well-organized rebels, the Saudi rulers reflect the same confidence. They reject all comparisons with Iran.

The first great difference from Iran is that instead of all the power being in the hands of one man, the princely and ruling family of Saudi, which has given its name to the country, runs to several thousand members.

Many of them, such as King Khalid and Crown Prince Fahd, are in commanding positions within what is a large oligarchy. Still more are private, though privileged citizens. And some are active bad apples. "Two of the princes are languishing in my jail," the governor of Riyadh, a brother to the crown prince, explained, almost proudly.

In this still partly tribal society, the princes themselves form a tribe, and it would be difficult, if not impossible, to overthrow the whole tribe.

The second difference is that while the shah was a largely secular monarch in a Moslem world, the Saudi rulers can fairly claim to be firm upholders of traditional Islamic values. Although the application of the oil money and the admission of western technology have eroded some of those values, Saudi Arabian society remains, at least externally, self-consciously austere.

The third factor is that the Saudi regime, for all its riches, is neither arrogant nor boastful, as the shah was. There is no talk of becoming the world's fifth power, of being the policeman of the Gulf. Much of the oil money goes for welfare: free schools, free medical care, very low-interest loans for housing. But there is an obverse side to this coin: corruption.

Moving around the country you can easily get the sensation that you have strayed onto some cosmic building lot. In the huge contracts for the construction of airports, universities, gas pipelines, desalination plants, whole new industrial cities, the opportunities for swollen commissions and rakeoffs are endless. And it seems that it is not just rumor that some of the princes act as intermediaries for some contracts and thus become passengers on the gravy train.

One (non-royal) government minister told me he had been offered more than $1 million if he would steer a contract in the required direction. He refused. Even if he had accepted, it would have been a small bribe by Saudi standards. This same man thought that in view of the huge temptations, it was surprising that corruption was not greater. The knowledge that it exists must be an irritant to those who are already hostile to the ruling system.

Exactly who these critics are is difficult to define. A body calling itself the Organization of the Islamic Revolution in the Arabian Peninsula proclaims (from London) a program virtually indistinguishable from that of the ayatollah in Iran.

To these must be added the discontented Bedouins, the country folk who have missed out on the boom. Add to them some rich Jeddah merchants who are critical of the pace of development and of the royal family's hogging of the spoils, and you get a curious ill-mixed but potentially powerful brew of malcontents.

Stories also circulate of anti-government graffiti washed off Jeddah walls; of schisms within the royal family itself, with some of the younger princes dreaming of a palace revolution that would sweep away the present generation -- the sons of the old King Saud -- and replace them with the grandsons; of disaffection within the National Guard, the Bedouin praetorians who are independent of the regular armed forces.

The dimension of the threat is impossible for an outsider to judge. But there are two significant pointers to the royal leaders' awareness of current pressues.

The first is the revelation by Crown Prince Fahd that a constitution, or basic system of government, as he calls it, is to be promulgated shortly. He told me that this was first thought of years ago by King Faisal and was therefore not a response to present challenges. But the announcement last month of a consultative council to share in decision-making, is a piece of timing too striking to be a coincidence.

The second sign is what Fahd said in an interview last month with an Arab magazine about misdeeds in high places. "Those in responsible or official positions have no right to carry out any trade activities," he said. "This applies to princes as well as Cabinet ministers."

The princes came in for more criticism when Fahd spoke disapprovingly of some Saudi travellers abroad who "shower dancers and singers with banknotes in European nightclubs." This must and will be stopped, he said: "Those measures that will be taken against all those who harm the reputation of their country will be applied to members of the royal family in the first instance."