Saudi Arabia is beginning to look like a society under siege.

At Riyadh's trendiest shopping mall on a quiet afternoon last month, security officers were stopping vehicles entering the parking garage, opening hoods and trunks in search of explosives. At the Marriott Hotel, near the Petroleum Ministry, and at other hotels in the capital that cater to Westerners, ground-floor windows have been bricked up and Jersey barriers installed across driveways. At the airport, the fence around the Royal Terminal, which serves the king and the princes of the House of Saud, is topped with razor wire. On Riyadh's main boulevards, and on the causeway connecting the kingdom with Bahrain, police have set up security checkpoints.

These are surprising sights in a country that has always prided itself on its law-and-order, crime-free environment. They reflect the unhappy fact that for the past 13 months, Saudi Arabia has been afflicted by an escalating wave of terrorist violence aimed at bringing down the regime, purging the country of Western influence and choking off the nascent liberalization of Saudi society. Scores of people have died in bombings and shootings at housing compounds where foreigners live and at oil industry facilities, including the May 29 attack in Khobar that claimed 22 victims. Yesterday, an American was shot and killed outside his home in a Riyadh suburb. Newspapers report frequent shootouts between security forces and suspected terrorists whose arsenals of weapons and explosives are distressingly large.

The desperadoes are Saudis, nurtured in an extremist environment that the government itself has long fostered. They are linked to al Qaeda and sympathetic to their countryman Osama bin Laden -- which has predictably stirred speculation about the stability of the kingdom. Bin Laden and his followers have made clear that they are committed to overthrowing the House of Saud. Given the increasing audacity of the terrorists, the country's swelling ranks of unemployed malcontents and the apparent indecisiveness of the senior princes, it might appear that the insurgency could indeed bring down the regime or at least ignite a civil war.

Yet forecasting the demise of the Saudi monarchy would be premature at best -- and probably wrong.

The ruling princes are skillful, ruthless when necessary, unconstrained by the niceties of civil liberties, and connected by marriage and business ties to a huge percentage of the population, which secures them support and loyalty. The family history is one of alternately accommodating and crushing the religious militants whom the kings have used as allies -- except when they defied royal authority.

This balancing act has defined the internal politics of the kingdom since the 1920s. In 1929, when the religious zealots known as the Ikhwan challenged the authority of the country's founder, King Abdul Aziz ibn Saud, he killed or exiled most of them, despite their earlier efforts to help him unify the kingdom. When armed extremists took over the Great Mosque in Mecca in 1979, the regime showed them no mercy, publicly beheading 62 men in eight cities. Self-preservation is the first law of the House of Saud.

This is not to minimize the problem the regime faces today. There appears to be a large pool of poorly educated, narrow-minded, violence-prone men who are steeped in the religious absolutism that the regime itself promoted for 20 years, principally to reestablish its Islamic religious credentials after the mosque takeover.

These militants are willing to take up arms, attack women and children, and die for the illusory cause of an Islamic state culturally and spiritually similar to the one created by the Prophet Muhammad in the 7th century.

The messages they hear from the country's xenophobic religious establishment -- anti-Western, anti-Semitic, anti-feminist -- reinforce their convictions. Indeed, even Crown Prince Abdullah, the de facto ruler, reinforced the venomous rhetoric by blaming "Zionists" for the Khobar attacks. His powerful half-brother, Prince Nayef, the interior minister, had earlier held "Zionists" responsible for the attacks against the United States on Sept. 11, 2001.

More than a thousand of the most inflammatory preachers have been removed from their pulpits since then, but the senior princes are still reluctant to confront the religious leadership because alliance with it is the foundation of the regime's legitimacy.

Recognizing this contradiction, Prince Bandar bin Sultan, the Saudi ambassador to the United States and a grandson of the founding king, called this month for the ruling princes to stop blaming others for the country's troubles and urged a total mobilization of the country's resources for what he depicted as a war to the death.

If the regime treats the terrorists the way Abdul Aziz treated the Ikhwan -- that is, destroys them -- the House of Saud will prevail, he said; if the rulers treat them as "Muslim youths who have been misled . . . in the hope that they will come to their senses," the House of Saud will be destroyed. (Excerpts from Bandar's manifesto appeared in last Sunday's Outlook.)

Still, even with its history of corruption and autocratic rule, Saudi Arabia does not face the conditions that have provoked revolution in other developing countries. It cannot be compared, for example, to Iran in 1978, where a society was united in its desire to get rid of the shah, who was perceived as a usurper who devalued Islamic culture.

It is not like Vietnam in 1963, where the National Liberation Front could claim to represent legitimate nationalist aspirations. It bears no resemblance to the Lebanon of 1975, where a weak state collapsed in the face of a Muslim-Christian conflict. Never having been colonized, Saudi Arabia offers the insurgents no veneer of anti-colonial motivation.

That is why the militants have gained little if any political traction among the majority of Saudis; on the contrary, their brutality appears to have rallied the population around the government, according to Saudi journalists and independent analysts, both Saudi and foreign. Even Saudis critical of the monarchy and hostile to the United States say they do not want the religious totalitarianism promised by bin Laden's brownshirts.

There is indeed a revolution taking place in Saudi Arabia, but so far at least it is not the kind that unfolds at gunpoint. More and more, and with increasing openness, Saudis are demanding reform, and the country's rulers are responding. A wave of collective introspection, which began with the realization that 15 of the 19 hijackers responsible for the 9/11 terrorist attacks were Saudi, has prompted their countrymen to question their traditions, their laws and their attitudes; the result is change at an accelerating pace.

Self-styled "reformers" and advocates of greater political openness are sending petitions to the crown prince and agitating for change in the increasingly vocal press, often risking arrest. Even these activists, however, seek change within the existing structure, acknowledging that the monarchy is the glue that holds together a fractious society.

During a visit last month, I heard for the first time Saudis talking openly about societal ills that were taboo subjects in the past -- child abuse, wife-beating, drug addiction among women and birth deformities attributable to intermarriage. No longer do the Saudis smugly assume that theirs is a perfect society, in harmony with God's directives and Islam's traditions.

Much of this change appears to be inspired by the new generation of educated women clamoring for a larger place in the country's economic -- and even its political -- life. New areas of employment, even in factories, are being opened to women, and Saudi officials say women will be permitted to vote in the upcoming municipal elections, the country's first since the 1960s. Laws are being rewritten to encourage women to start businesses and invest their considerable capital. In April, the government abolished a rule requiring women who wished to enter business to be represented by male guardians when dealing with officials, and two weeks ago the government directed that land in industrial zones be set aside for operations run and staffed by women.

Of course, opening new areas of employment to women may compound unemployment among Saudi men, but the government has committed itself at least on paper to addressing that problem by expanding the private-sector economy and restricting the use of foreign workers in some workplaces, such as travel agencies. Saudi business executives, government officials, members of the appointed consultative assembly and prominent journalists talk optimistically about the reformist tide rippling through the society. They say it is now inevitable that the political system will become more inclusive, women will have greater rights, school curriculums will be modified to eliminate hatred and fanaticism, and the economy will be opened up. The only argument, they say, is about pace and timing.

Yet pace and timing are crucial, because each step toward modernizing the society provokes a backlash, sometimes violent, among the extremists of doctrinaire Islam known as Wahhabis, who even now are permitted to spread their fascist-style message through the country's mosques and schools. As Muqtedar Khan, a professor at Adrian College in Michigan, wrote after visiting the kingdom in April, "Wahhabi ideas are now so deeply embedded that neither the ruling elite, who had abdicated their normative responsibilities until now, nor the religious elite, who are afraid of what they have created, can rein it in. Any attempts at sudden reforms may upset the delicate balance within the society and empower" the terrorists.

Saudi forces will win their gun battles with the terrorists. The greater challenge before the House of Saud is to satisfy the aspirations of the majority -- and maintain their security and economic ties with the United States -- without further inciting the religious extremists whose rhetoric gives cover to the terrorists. The task is especially difficult because the royal family's sole claim to legitimacy is its role as the upholder of Islam. To the extent that the regime embraces social progress that can be depicted as un-Islamic, and especially if it appears to do so at the behest of the United States, the backlash could elevate the violence of the past year into a full-scale insurrection.

Author's e-mail:

Thomas Lippman, a former Washington Post correspondent in the Middle East, is an adjunct scholar at the Middle East Institute and author of "Inside the Mirage: America's Fragile Partnership With Saudi Arabia" (Westview Press). He has just returned from a week-long visit to the kingdom.

Changed landscape: A street near a Riyadh hotel reflects the Saudi kingdom's concerns about security.The new facts of Saudi life: Security at a shopping mall in Riyadh, left; and, clockwise, at the national police building, where a car bomb exploded in April; at a Khobar housing complex for foreign oil workers, where 22 were killed in May; and at such Western symbols as McDonald's.