Saudi security forces take part in a military parade. (Getty)

A reliable barometer of Saudi Arabia’s political comfort level is how quickly the country responds to difficult news.

When the ruling monarchy feels secure, the wait can be long for an official statement or the Saudi spin on events. On Wednesday, however, Saudi officials were unusually fast with details after a fire engulfed a diesel pipeline owned by the state-run oil giant Aramco.

The message: It was caused by a leak and not from terrorist sabotage.

Still, the subtext also was clear. Saudi Arabia is on edge these days.

On Monday, gunmen killed at least eight people in an attack on Saudi Arabia’s minority Shiite community, which has staged stop-and-start protests for years seeking greater rights. The next day, two security agents were killed in shootouts with suspects. The attack, claimed Interior Ministry spokesman Gen. Mansour al-Turki, was masterminded by a Saudi militant who spent time with ``terrorists’’ outside the kingdom.

Saudi media went farther. Reports said suspect was in Iraq and Syria – raising suggestions of a link to the Islamic State. The militants may share some of the ultraconservative views of Saudi Arabia’s Wahhabi brand of Islam, but consider the kingdom’s rulers as disgraced by their close ties to the West.

More than 20 suspects are in custody in connection with the Shiite attack, including two policemen. Three other alleged plotters were killed in the nationwide manhunt, which continued Friday.

A statement from 50 prominent Saudi religious and political figures earlier this week said a “malicious, Satanic ideology” guided the attackers. The Interior Minister called it a ``deviant” departure from Islam.

If it seems somewhat familiar, there’s a reason. Saudi authorities launched massive crackdowns on al-Qaeda and other groups as part of political damage control after the Sept. 11 attacks in 2001. The vast majority of the 9/11 hijackers were Saudi born, as was al-Qaeda leader Osama bin Laden.

Part of the inner circle overseeing the Saudi anti-terrorism sweeps at the time, then-Riyadh governor Prince Salman, is now the heir to the throne, which is held by his 90-year-old half-brother, King Abdullah.

The current Saudi unease reaches even farther afield.

In many ways, it’s a crash course in the wider bloodshed and brinksmanship in Syria, Iraq and beyond. The various sides and interests – the jihadis, the West and its allies, Iran and its proxies – all cross paths in some ways with Saudi Arabia.

Saudi Arabia has denounced the Islamic State and Syria’s al-Qaeda affiliates, led by the Jabhat al-Nusra, or Nusra Front. But some private Saudi groups – and those in other Gulf countries – are believed to be a source of steady private funding to factions such as Nusra.

Publicly, Saudi officials condemn such grassroots aid. But there is little serious effort to stop it.

There are few things higher on Saudi Arabia’s priority list than bringing down the government of Syrian President Bashar al-Assad, who has held off a more than three-year uprising started at the height of the Arab Spring.

Clearing out Assad – a key Iranian ally - would give Saudi Arabia and other Sunni-led states a chance to expand their influence. While, at the same time, it would be a satisfying swipe at Shiite power Iran, the main regional rival of Saudi Arabia.

Here’s where it gets a bit tangled.

Iran is a major opponent of the Islamic State, which considers Shiite Islam a heretical offshoot. (The differences go back to the leadership succession in the decades after the death of the Prophet Muhammad.) In Iraq, Iran’s allied Shiite militias have joined the battle against the Islamic State.

U.S. officials are not objecting too strongly at having the Iranian-backed fighters in the mix as Washington gropes for effective strategies to roll back the Islamic State. President Obama has even made a rare outreach to Iran’s Supreme Leader Ayatollah Ali Khamenei with a letter concerning shared opposition to the Islamic State.

All this is hard for Saudi Arabia to swallow. Saudi leaders – stalwart U.S. allies – have always counted on Washington’s cold war with Iran as one of the great constants in regional affairs.

Saudi Arabia also felt that way about the durability of Egypt’s Hosni Mubarak. The Arab Spring uprisings shook the Saudi establishment to the core. Through their eyes, the lesson was that an alliance with Washington was no guarantee of survival.

Even the American oil market is no longer a given. Surging U.S. oil and gas production has rattled the OPEC old guard.

So Saudi Arabia is looking around for backup plans.

It appears willing to let oil prices slip in attempts to win back U.S. market share. Meanwhile, Saudi security chiefs are now leading discussions with other Gulf states and Egypt for a possible combined military force – a sort of Mideast version of NATO – to intervene around the region against extremists and - equally important - as a show of force to Iran.