Saudi Arabia, despite producing more Islamic terrorists than any other country, has managed to contain such violence within its borders. Since 2006 there have been few attacks and none that were really successful. There are still attempts. So far in 2019 there was one in the capital (Riyadh) by four heavily armed (guns, grenades, explosive vests) men against the Intelligence headquarters compound. This effort failed and not only were the four attackers killed but their base was found and raided and that led to the arrest of 13 supporters. This was not an exception, but the norm. There were three of these attacks defeated in 2018 and two in 2017. Many of these involved Shia Saudis. The Shia are about 12 percent of the population and complain, with some justification, of discrimination and inability to share in the oil wealth that the Sunni majority enjoys. Iran has been caught encouraging violence by the Saudi Shia but this just got more Saudi Shia arrested and dozens of these suspects were prosecuted and executed. The Saudis did make more efforts to address Shia complaints but the anti-Shia prejudice persists, as it does throughout most of the Moslem world. Many Saudi leaders realize this Shia discrimination if bad for the kingdom but most Saudis are more traditional when it comes to who they dislike on sight.
Saudi Arabia has avoided most of the unrest that hit the rest of the Arab world after 2001 and 2011 and there were several reasons for this. A major plus is that a majority of Saudis are loyal to the Saud family, even though many Saudis chafe at the religion-based restrictions. For that reason women gaining the right to drive vehicles was considered a major achievement. With that many loyal subjects the Saudis established a very effective intelligence organization. At the same time the government made energetic, expensive and only partially successful efforts to “rehabilitate” sons who had been radicalized. Families knew they could call on the government for help and compassion. If that failed the errant sons, like Osama bin Laden, are often disowned by their own kin (most of them at least when it came to bin Laden).
When it came to counter-terrorism training for the security forces, no expanse was spared and the best equipment and training facilities and personnel were obtained. The fact that the security forces regularly came out on top when there was an attempted attack did not reflect well on Saudis who embraced Islamic terrorism. God was obviously choosing sides and backing the Saud family.
While many Saudis own weapons, the success of the counter-terrorism efforts led to more restrictions on who could own weapons, or which weapons could be imported for sale. There were also restrictions on the import and possession of bomb making materials> all this was tolerated by the general population.
Donating money to Islamic terrorists was another matter. This was often done via Islamic charities that did perform some charitable functions with the cash raised. But even before 2001 many of these charities were little more than conduits to Islamic terror groups like al Qaeda and many others most Westerners never heard of. After years of complaints from Western governments, who provided more and more convincing evidence, in 2002 the Saudis began to crack down. Like every other reform in the kingdom the effectiveness of the new charitable contribution restrictions took time to be implemented and then show any meaningful impact. By the time ISIL (Islamic State in Iraq and the Levant) showed up in 2013 it had become very difficult for Saudis to legally pass cash to Islamic terror groups. At this point the Saudis had popular support for this “Cultural War” against aberrant Islamic radicalism. Most Saudis were still Islamic conservatives and backed the use of force to “defend Islam” but also recognized that some radical groups saw any Moslem who did not agree with them as the enemy. That included most people in Saudi Arabia and the Sauds had made it acceptable to oppose these radicals with persuasion and, if that failed, lethal force.
Another major factor is that the kingdom has two quite different armed forces. One protects the royal family, the other protects Saudi Arabia. Overall, the Saudi military has about 200,000 troops. But 80,000 of those belong to a separate force, the National Guard. These are organized into eight brigades (three mechanized and five infantry, for a total of 32 battalions.) There are also another 24 battalions of National Guard reservists. About 75 percent of the National Guard troops spend most of their time guarding oil facilities, and other important government assets. The rest provide security for the royal family and key government officials. The most loyal, and able, members of the royal family hold senior commands in the National Guard. This is an organization that puts a lot of emphasis on loyalty to the Saud family.
The National Guard is well armed and trained, all of them. But most of all, they are loyal to the royal family. But being that the country is called Saudi Arabia, after the ruling Saud family, the National Guard also protects the government in general. Since the Sauds see themselves, first and foremost, as the protectors of the most holy places in Islam (Mecca and Medina), the National Guard also serves God. So the National Guard is far more than tribal warriors loyal to a wealthy and generous family. The National Guard are holy warriors, who follow the protectors of the Islamic holy places. That's a big deal in Arabia, and the Islamic world. While the National Guard recruits first for loyalty, next comes bravery and willingness to die for the cause (the royal family and Islam.) Then comes military aptitude.
The National Guard were originally, a century ago, the Ikwhan. These were truly holy warriors, being Bedouin fighters dedicated to the strict Wahhabi form of Islam, and killing enemies of Islam. The founder of Saudi Arabia (Abdul Aziz Ibn Saud) used the Ikwhan as his shock troops. In the 1930s, the new kingdom of Saudi Arabia had to curb the Ikwhan , who were continuing to raid outside the kingdom, since there were no more enemies to go after inside the kingdom. To avoid wars with neighboring states, the Ikwhan was shut down (with some bloodshed), and some of its members helped form the National Guard.
Foreign trainers were (and still are) brought in to help the National Guardsmen improve their combat skills. These foreigners that many of their students are not well educated, but nearly all are eager to learn new ways to fight. The National Guard gets the best equipment, and gets it quickly. The National Guard is not armed to fight foreign enemies, but internal ones. It has no tanks or jet fighters. It has lots of wheeled armored vehicles, some artillery plus helicopters and light recon aircraft. The National Guard is equipped to get where they are needed quickly, and suppress any unrest before it can grow.
The communications of the National Guard connects directly to the royal family, and is set up to coordinate with the regular army. The National Guard has about a thousand wheeled armored vehicles and some artillery. After 2001 over $20 billion was spent on new wheeled armored vehicles, and lots of neat gadgets like night vision gear and new communications equipment. Bedouins love this stuff, and adapt quickly to it. The National Guard commanders noted the experience of American troops in Iraq, and have requested, and generally been able to purchase, all the weapons and gear American used successfully in Iraq. If the National Guard goes to war, it will be with Islamic radicals similar to those encountered in Iraq. The National Guard troops have also noted how Iraqi troops adopted American weapons and techniques, and been successful fighting terrorists.
Nearly all the National Guardsmen troops are Bedouins, usually from tribes that have been historical allies of the Saud family. The king considers the Guardsmen his boys, and takes good care of them. If a Saudi needs a favor from the king, he's much more likely to get it if he is, or was a National Guardsman.
About a third of the National Guard are especially selected from the most loyal (to the royal family) families. This is the "White Army" (for the traditional white robes of the Bedouins). The most loyal force is the 2,000 man Royal Guard Regiment. These, as the name implies, are responsible for the day-to-day security of the king and his immediate family.
When Saudi Arabia was put together 90 years ago, many tribes were encouraged to join the new kingdom by force, or lots of verbal coercion. These groups continue to hold a grudge (a venerable Middle Eastern custom), and the most hostile of these are not recruited for the National Guard.
The National Guard has been called out several times, and has always managed to get the job done. In 1979, it was the National Guard who took down the Islamic radicals who had invaded the Grand Mosque in Mecca (with a lot of insider assistance, including National Guardsmen who sided with the rebels). This even triggered a lot of changes in the kingdom but by 1990, it was the National Guard that went in to expel Iraqi troops had occupied a Saudi border town. During the battle with al Qaeda from 2003-6, it was the National Guard that was called out when large numbers of troops were needed (usually to blockade an area terrorists were believed to be in). The loyalty of the National Guard was one reason al Qaeda was never able to make a successful attack on an oil facility. Al Qaeda often relies on bribes to penetrate heavy security. The National Guardsmen protecting those sites were incorruptible. The current unrest in the Middle East has not manifested itself in Saudi Arabia in part because Saudis realize that the National Guard will fight to the death to protect the royal family.
Early on (by 2003) Saudi Arabian intelligence had penetrated al Qaeda groups in their country to the extent that they are getting more information on planned attacks. Also, increased security around housing compounds has resulted in the detection of al Qaeda members scouting neighborhoods inhabited by foreigners. At the time there were about 30,000 Americans, and about the same number of Britons, in the kingdom. American diplomats and citizens are on alert for the possibility of attacks. Embassy personnel have been ordered to stay in their compounds between 6 PM and 6 AM (unless on official business.) American citizens have been advised to do the same. British subjects have been given similar warnings, and all non-Moslems in the kingdom have increased their security measures.
Arabs, particularly Saudis, noted that al Qaeda attacks killed mostly Arabs, which by 2003 had made the terrorists very unpopular in Saudi Arabia. That has not changed. While the country is a monarchy, it is one based on aristocrats who respect and cultivate family and tribal relationships. To a point, these relationships can be exploited to make people change their behavior, if not their minds. Osama bin Laden lost his citizenship, and contact with most of his family, when he refused to back down on his call for establishing an "Islamic Republic" throughout Arabia. But most other Saudis, including many Islamic radicals, can be reached by the family and tribe connection. There's also a practical way to rein in al Qaeda support among the conservative, and often radical, Islamic clergy. Most of these preachers and teachers are on the government payroll. The royal family uses this angle sparingly, as too much pressure on the clergy could turn them against the Sauds. Still, uncles can be called on to "control" radicalized nephews. Each of the thousands of Saudi princes have many men who owe them favors. If "your" prince calls you in for coffee and a little chat, it is considered very bad manners to deceive or refuse him. In the past, these connections have been used by families to get radicalized sons and nephews out of trouble. Now it also gets the kids on a list of people to be watched, searched, or arrested and interrogated. Some families turn in suspect sons to keep them from doing something irredeemable.
The Saud family also takes their role as "protector of the holy places of Islam" seriously. Much oil wealth has gone into religious activities and support for the millions of Moslems who make the pilgrimage to Mecca each year. While the Saud family is much hated for the corruption, they do get respect for their religious works. However, a lot of that money went into supporting the establishment of mosques and religious schools worldwide that taught the conservative form of Islam (Wahhabism) that has long dominated Arabia. The deliberate spread of Wahhabism resulted in organizations like al Qaeda and ISIL. After 2003 there were a number of bombings and gun battles in Saudi Arabia that convinced the Saudis, more than years of complaints from Western diplomats, that supporting radical religious beliefs can backfire. But this is nothing new for the Saud family. The founder of the dynasty, Abdul Aziz bin Abdul Rahman Al Saud, had to crack down on armed Islamic militants shortly after the kingdom was founded in the 1930s. There was much bloodshed. After that, the family played a cautious game of supporting Islamic conservatives they thought they could control. This led to comic (to Western eyes) situations like the Saudi princes working hard at convincing Islamic scholars that radios and non-religious programming was not "un-Islamic." This was done by having sceptics listen to a radio broadcast of a cleric reciting portions of the Koran. But persuasion does not work with the hard core Islamic radicals. That was one reason the Saudis looked the other way as many of the local radicals went to other countries, especially Iraq after 2003 and Syria after 2013, to become full-time Islamic terrorists. Few were allowed back alive, but corpses were OK, as a public burial was warning about what this radicalism ended up.