Shaken by large scale terrorism at the Grand Mosque in Mecca, Saudi Arabia's royal rulers have toughened enforcement of strict Islamic laws in recent weeks and intensified efforts to retain the political loyalty of their subjects.

The measures, which also include an attempt to tighten internal security and intelligance gathering, provide the first indications of how the royal family intends to react to last November's mosque takeover by several hundred Islamic rebels.

As described by diplomats here, the measures seem to portend renewed emphasis on the kingdom's conservative Moslem heritage and more Bedouin-style consultation between the Saudi population and the monarchy.

The most obvious consequence, according to foreign observers resident here, is the harking back to Moslem strictures that traditionally have been part of Saudi society but are enforced more or less stringently according to the political climate.

"Nobody knew at first how they would react," said one diplomat. "It looks now like it's going to be a definite shift to the right."

Saudi newspapers have begun paying more attention to bans on photographs of women that could be considered offensive in the puritan Saudi Context. The Arab News, an English-language paper published in Jeddah, recently went so far as the blot out the face of Bette Davis, the 71-year old actress who was shown in a conversation with television personality Mike Wallace.

Interior Ministry officials also have strengthened their opposition to employment of women, even by foreign companies operating here. Lockhead recently was forced to dismiss dozens of women employes and the European manager of a Riyadh hotel was questioned by police because he hired a female secretary, foreign residents reported.

Islamic traditionalists from the Mutawain, the Society for Enforcement of Virtue and Elmination of Vice, accompanied by Interior Ministry officials, recently visited the Office of the U.S.-Saudi Joint Economic Commission in Riyadh to complain about women working there, sources said.

Moreover, royal largesse to tribal leaders who are essential to running the kingdom appears to have become considerably more liberal since the Mecca takeover. It was by subjugating the tribal chiefs and dispensing patronage to them that King Abdul Aziz, father of King Khalid and Crown Pince Fahd, gained control of the kingdom and proclaimed himself its monarch in 1932.

Nearly 50 years later, Saudi royalty is doing the same thing, but also responding to the Mecca challenge by reviving promises of a "consultative assembly" to guide the monarchy. Although the assembly has been talked about before with little result, the renewed pledged to organize it is seen by analysts here as an effort to broaden participation in government following the Mecca incident.

As being discussed by Saudi officials, the assembly probably would include appointed members picked by Khalid from tribal supporters and other members voted in by an electorate yet to be defined. It powers are expected to be purley advisory, in the manner of Bedouin family leaders consulting with their tribal sheik.

"If it's democratic, it will be democratic in the Bedouin way," said a diplomat monitoring the discussions.

To timetable has been fixed for the assembly, but it is to be part of a "basic law" being prepared for promulgation in several months.

Police also have become tougher in enforcing rules obliging shopkeepers to close down for the prayers that are a part of daily life here, in principle five times a day. Laxity in observing the rules has been a longstanding complaint of the Mutawain, whose zeal reflects a strong current in Saudi Arabia's uncompromising Wahabi brand of Islam.

The new rigor appears to be a direct response to fundamentalist demands voiced by leaders of the Islamic gunmen who occupied Mecca's mosque for two weeks in November. The rebels specifically condemned employment of women in commerce, the spread of television and such non-Moslem pastimes as professional soccer.

Observers here also emphasized the traditionalist Moslem punishment used against some of the captured gunmen. More than 60 were beheaded with heavy swords in public squares, for the most part of their own home towns across the kingdom to underline the severity of Koranic Justice.

More than two months after the mosque occupation, Saudi authorities still have made no widescale arrests on the basis of their interrogation of captured gunmen, diplomats say. This indicates that the band, said to number of 300, did not have a broad dissident network behind it, they add.

At the same time the rebels' impressive military organization and obvious training demonstrated long preparation and an ability to move undetected among the Saudi population.

Analysts here suggest that had the gunmen picked a less sacred target than the Grand Mosque -- a radio station or ministry, for example -- they might have generated some popular support for their protest against the royal family's style of rule.

Apparently conscious of this, King Khalid, Crown Prince Fahd and other Saudi rulers have sharply increased their appearances at Bedouin tribal councils, school and road openings and other public gatherings.

"It's like the last weeks of an election campaign," said one diplomat noting the quickened pace of royal forays into the population.

It addition to these moves toward the people, Saudi rulers are trying to strenghten their internal security apparatus after its failure to detect plans for the mosque assault and long delays in routing the rebels out of the shrine.

A royal decree Jan. 1 dismissed the chief of internal security, Gen. Fayez Mohammed Aufi, replacing him with Gen. Abdul Rahman Sheik. Another decree the same day announced the resignation of the governor of Mecca, Prince Fawaz, Khalid's brother.

During the battle to dislodge the rebels, Fahd and his brothers -- Prince Sultan, the defense minister; Prince Nayef, the interior minister; and Prince Abdullah, commander of the National Guard -- took direct command.

Observers dismiss a report in the French magazine Le Point last week that French antiterrorist experts were brought into the kingdom to advice the Saudis. Knowledgeable sources reported that the Saudis instead sought advice from the large U.S. military training mission and Corps of Engineers team here assisting the Saudi National Guard and advising on Saudi military modernization programs.

Saudi princes were in frequent telephone contact with U.S. officials during the siege, the source said, particularly in the difficult battle to overcome the final band of rebels holed up in the mosque's basements and underground passages.