Many Americans believe that Saudi Arabia has links to Islamist militants, but the Saudis say they are victims of terrorism, too.
The self-proclaimed Islamic State has recruited more than 2,000 young Saudi men, despite government programs to stop them.
Now, the Saudi government shares the fears of the U.S. and Europe: that these violent young men will come home and carry out attacks. There are signs that's already happening. As a result, the Saudis are ramping up training for counterterrorism missions.
One place that's happening is in a secretive, tightly guarded training center for the elite special operations forces. It's a sprawling campus, on the outskirts of the capital, Riyadh, where Saudi security officers drill on scenarios taken from actual attacks, with cameras rolling for feedback and sensors to measure reaction time in seconds.
In one drill, 10 fully armed men clad in black move from room to room. The goal of the live-fire exercise is to clear a militant hideout in less than two minutes. The walls are covered with heavy foam to absorb the bullets.
This month, much of the training has moved to Saudi Arabia's northern border. For the first time, all seven of the kingdom's security units are training together near the Iraqi frontier, which is also a first, says Gen. Monsour al-Turki, spokesman for the Ministry of Interior.
The exercise comes after suicide attackers from Iraq crossed Saudi Arabia's northern border in January and killed a Saudi general and a border guard.
"We want to make sure that this coordination is upgraded and this integration will take place when they have to face terrorists trying to cross the border of Saudi Arabia," Turki says.
Saudi Arabia's new King Salman recently inherited the throne at a time of regional turmoil and lower oil prices. Salman quickly named his new team, including his youngest son, who was appointed minister of defense.
A rising star in the new government is another close relative, Mohammed bin Nayef, who is the new interior minister. The U.S.-educated 55-year-old now oversees all internal and external security. His first move has been to streamline command of the security services.
Academic Paul Pillar, a former U.S. intelligence officer for the Middle East, says the king's appointments are based on royal politics.
"Clearly the moves he's made have been in the direction of concentrating more power in parts of the family that are more closely associated with him," Pillar says. "The intra-royal family politics is also going to be a large part of it."
But in this case, he says, the new power lineup also addresses a rising security threat: terrorism, rather than an external army rolling across the border. Pillar says it's why the special operation forces are taking the lead.
"Intense, elite and small is what they need right now, rather than large and cumbersome," he says. "When the Saudis have decided to place high priority and intense resources in a particular effort, they have done very well."
Back at the training center, another drill is underway. It's taking place in a room with a floor that's unsteady by design. Pop-up figures move quickly in a drill called "friend or foe" that tests reaction times.
A figure with a camera? Friend. One with a gun? Foe. The participants have to be able to tell immediately which is which — and whether to shoot.
The room where this exercise is taking place can be dimmed for a nighttime drill. Trainers can add distractions such has heat or noise, or drill after a 10-mile run, says Maj. Ahmed Hikimi.
"It's not only training to shoot, but put him under pressure and test his ability to shoot," Hikimi says.
Saudi Arabia is under pressure, too, says Turki, the spokesman for the interior ministry.
In addition to January's attack in the north, there was a cross-border raid last summer on the southern frontier of the kingdom. All together, seven policemen and nine militants have been killed in the two attacks.
"Terrorism is surrounding us," he says. "Their intention is to be able to cross the Saudi borders and carrying out attacks in Saudi Arabia."
All the attackers were Saudi recruits to ISIS, Turki says, adding that it's a message from ISIS that Saudi Arabia is a target.