Saudi Arabia's execution of a dissident Shiite cleric triggered riots in Iran, a break in diplomatic relations and a sharp escalation in the sectarian feud that is destroying the Middle East. The Post's David Ignatius examines the rift. (Thomas LeGro/The Washington Post)

“Fragile” is the word that journalist Karen Elliott House used to describe Saudi Arabia in her 2012 book about the country. “Observing Saudi Arabia is like watching a gymnast dismount the balance beam in slow motion,” she wrote. The world holds its breath wondering if the Saudis “will nail the landing or crash to the mat.”

This past week, the House of Saud seemed to have lost its footing. The kingdom’s fear of a rising Iran led it to execute a dissident Shiite cleric, triggering riots in Iran, a break in diplomatic relations and a sharp escalation in the sectarian feud that is ravaging the Middle East.

What led Saudi Arabia to take these risky actions, and what U.S. policies might reduce the danger that the Middle East mess will get even worse? You can’t answer these questions without examining the Saudis’ insecurity, which has led them to make bad choices.

Saudi Arabia is a frightened monarchy. It’s beset by Sunni extremists from the Islamic State and Shiite extremists backed by Iran. It’s bogged down in a costly and unsuccessful war in Yemen. And it mistrusts its superpower patron and protector, the United States, in part because of the United States’ role in brokering the nuclear deal that ended Iran’s isolation.

Countries that feel vulnerable sometimes do impulsive and counterproductive things, and that has been the case recently with Saudi Arabia.

Compounding Saudi Arabia’s external problems is its internal ferment. King Salman’s ambitious son, Deputy Crown Prince Mohammed bin Salman, 30, has devised a plan for modernization and economic growth, with input from McKinsey & Co. and other global consultants. The plan makes all the right recommendations: boost private enterprise, diversify the economy away from dependence on oil exports, reduce the stultifying role of the Saudi state. But these reforms would challenge powerful senior princes and disrupt a society that is resistant to change.

A defensive, anxious Saudi leadership tried to show its resolve with last week’s execution of 47 extremists. Though global attention was focused on the death of Shiite cleric Sheik Nimr Baqr al-Nimr, most of the executed men were Sunni radicals who were allied with the Islamic State, al-Qaeda and other jihadist groups. Some Saudi-watchers think that killing Nimr was partly a cover for the execution of the radical Sunnis. Regardless of the motivation, Nimr’s execution was a mistake.

The Saudis compounded their error by rashly cutting diplomatic relations with Iran and pushing other Arab Gulf countries to do the same. The rationale was that the storming of the Saudi E mbassy in Tehran appeared to be government-condoned. Saudi pleas for help went unanswered for more than eight hours; the rioters scaled a 20-foot fence; their first target was the embassy computer system. The Saudi action was understandable, but an overreaction.

Saudi Arabia’s desire to resist Iranian hegemony had already gotten it in trouble in Yemen. The war is said to be costing the kingdom nearly $1 billion a month, with little to show but rubble on the ground. The Iranian-backed Houthi rebels have retaliated by attacking towns across the border in Saudi Arabia. The Saudis seemed eager for U.N.-sponsored peace talks on Yemen, until last weekend’s blowup.

What’s the best policy for the United States as the Saudi-Iranian sectarian battle deepens? The Obama administration has rightly tried to protect its Syria diplomacy, which just weeks ago had succeeded in bringing Saudis and Iranians together for negotiations in Vienna. The administration was reassured by a statement Tuesday from U.N. envoy Staffan de Mistura, who said after meeting with Saudi Foreign Minister Adel al-Jubeir: “There is a clear determination on the Saudi side that the current regional tensions will not have any negative impact on the Vienna momentum.”

The broader U.S. goal should be deescalation of the ruinous confrontation between Tehran and Riyadh. This inferno has engulfed the region — from Beirut to Damascus, Baghdad to Sanaa — and last weekend’s events show how easily it could expand even further. The United States is talking to both sides, but it also must restrain them — in part by checking Iran’s meddling in other countries’ internal affairs.

Saudi Arabia’s insecurities have been a driver of conflict for 40 years. Fearful of domestic threats, the Saudis bankrolled PLO terrorism, jihadist madrassas, al-Qaeda’s founders and Syrian warlords. Riyadh’s current enemy is Iran, but its anxiety goes much deeper.

The Saudis need reassurance that Washington has their back. Even more, they need to build a society that’s self-confident enough to combat extremism, at home and abroad.

Read more from David Ignatius’s archive, follow him on Twitter or subscribe to his updates on Facebook.