Saudi Arabia's break with Iran is widely seen as a symptom of the Saudi fear of an aggressive Tehran and the construction of a "Shiite Crescent" in the Arab Middle East that is encircling the Sunni Muslim-dominated kingdom. But there's also a strong domestic element to the concerns: the desperate desire by the Saudi ruling group to shift attention away from domestic troubles to foreign threats.

The Saudi government, led by nearly octogenarian King Salman bin Abdul-Aziz Al Saud, is under pressure from numerous home-grown threats. There is stiff opposition to the king himself and his son, Mohammad bin Salman Al Saud, recently appointed Deputy Crown Prince and to other top jobs, thereby placing him in line for eventual kingship.

Reduction of gasoline subsidies hit hard at the poor. Sectarian tension persists, driven by the discontented second-class citizenry of Saudi Arabia's Shiite Muslim minority.

Many younger Saudis think the royal family is a bunch of corrupt degenerates. Large numbers of disaffected youth have gone to Syria to fight alongside the Islamic State. ISIS is an avowed enemy of the Saudi monarchy, which it views as unwilling to engage in a cleansing jihad against foreign and local enemies.

So in some ways, tension with Iran is a useful diversion from an internal crackdown. King Salman sent a tough message to opponents with the execution-by-beheading of 47 people he alleged were terrorists; 46 were Sunni Muslim Saudis. The Saudi Foreign ministry issued a statement to justify this housecleaning, which it said was "based on clear and undisputed physical evidence" of terrorism." Some of the charges dated back more than a decade. The show of brutal domestic scimitar-rattling was a vivid message to highlight just who is in charge.

Despite the clear internal motive for the executions, foreign commentators and government mostly focused on the killing of a single Shiite cleric, Nimer al-Nimer. Iran, a Shiite Islamic republic, which has set itself up as protector of Shiites everywhere, protested. A mob in Tehran trashed and torched the Saudi embassy.

The Saudis responded by cutting off diplomatic relations and got its allies, Kuwait, Bahrain and Sudan to do the same. The United Arab Emirates downgraded its relations.

The Saudi foreign ministry accused Iran of harboring terrorists and of "blatant intervention" in "Iraq, Yemen, Lebanon and Syria, where it has directly interfered through the revolutionary guard and the Shiite militias from Lebanon and other countries of the world, resulting in the killing of more than 250,000 Syrians."

Indeed, Iran's foreign policy worries the Saudis, who featured themselves Arab world leader and successor to historic Sunni Muslim domination of the region. To the north in Syria, the Saudis see Iran as backer of an Alawite minority regime that lords it over a Sunni Muslim majority. To the east, it sees Iran as sponsor of a restive Shiite majority in Sunni-ruled Bahrain. To the south, it regards Houthi Shiite rebels as an Iranian cat's paw fighting a Saudi-installed government. Iran influences a former Saudi client in Palestine, Hamas, with financial support.

And there are other alarming outside factors. The steep decline of oil prices and the feeling that the United States, its main post-World War II ally, has abandoned it. Exhibit A is President Obama's willingness to cut a nuclear deal with Iran without trying to curb Tehran's interventions on Saudi Arabia's doorstep.

The escalation of tensions between Saudi Arabia and Iran is the latest episode in a 35-year old low-intensity conflict between the two regional powers. The competition took off in 1979, when the Shiite Islamic revolution triumphed in Iran. The new government solidified its hold on Iran with harsh Islamic moral and social restrictions and began to spread its influence outside by setting itself up as rival to the US, an enemy of Israel and supporter of non-state militias, foremost among them Lebanon's Hezbollah.

Saudi Arabia harbored its own designs for Middle East leadership and reacted by intensifying the spread its ultra-conservative Islamic ideology, Wahhabism. The Saudis funded mosques, trained preachers and supported insurgent and terrorist groups in places as far afield as Palestine and the North Caucasus.

This competition evolved in parallel to intermittent U.S. military and political interventions in the Middle East and the region's chronic instability. Following the disastrous Iraq adventure, the US withdrew from its dominant position in the Middle East, opening the way for regional rivals and secondary outside powers -- especially Russia and Turkey -- to enter the fray.

This tangle of internal and external crises represents a major existential crisis for a country once considered a lynchpin to Middle East stability. No more. Saudi Arabia is shoring up its internal controls in anticipation of a long struggle.