by

For the past eight decades Saudi Arabia has been careful.

Using its vast oil wealth, it has quietly spread its ultra-conservative brand of Islam throughout the Muslim world, secretly undermined secular regimes in its region and prudently kept to the shadows, while others did the fighting and dying. It was Saudi money that fueled the Mujahedeen in Afghanistan, underwrote Saddam Hussein’s invasion of Iran, and bankrolled Islamic movements and terrorist groups from the Caucuses to Hindu Kush.

Today that circumspect diplomacy is in ruins, and the House of Saud looks more vulnerable than it has since the country was founded in 1926. Unraveling the reasons for the current train wreck is a study in how easily hubris, illusion, and old-fashioned ineptness can trump even bottomless wealth.

The Kingdom’s first stumble was a strategic decision last fall to undermine competitors by upping oil production and, thus, lowering the price. Their reasoning was that, if the price of a barrel of oil dropped from over $100 to around $80, it would strangle competition from more expensive sources and new technologies, including the U.S. fracking industry, the arctic, and emergent producers like Brazil. That, in turn, would allow Riyadh to reclaim its shrinking share of the energy market.

There was also the added benefit that lower oil prices would damage countries that the Saudis didn’t like: Russia, Venezuela, Ecuador, and Iran.

In one sense it worked. The American fracking industry is scaling back, the exploitation of Canada’s oil sands has slowed, and many arctic drillers closed up shop. And, indeed, countries like Venezuela, Ecuador, and Russia took a serious economic hit. But despite obvious signs, the Saudis failed to anticipate China’s economic slowdown and how that would dampen economic growth in the leading industrial nations. The price of oil went from $115 a barrel in June 2014 to $44 today. Because it is so pure, it costs less than $10 to produce a barrel of Saudi oil.

The Kingdom planned to use its almost $800 billion in financial reserves to ride out the drop in prices, but it figured that oil would not fall below $80 a barrel, and then only for a few months.

According to the Financial Times, in order to balance its budget, Saudi Arabia needs a price of between $95 and $105 a barrel. And while oil prices will likely rise over the next five years, projections are that price per barrel will only reach $65. Saudi debt is on schedule to rise from 6.7 percent of GDP this year to 17.3 percent next year, and its 2015 budget deficit is $130 billion.

Saudi Arabia is spending $10 billion a month in foreign exchange reserves to pay the bills and has been forced to borrow money on the international financial market. Two weeks ago the International Monetary Fund’s (IMF) regional director, Masood Ahmed, warned Riyadh that the country would deplete its financial reserves in five years unless it drastically cut its budget.

But the Kingdom can’t do that.

When the Arab Spring broke out in 2011, the Saudi Arabia headed it off by pumping $130 billion into the economy, raising wages, improving services and providing jobs for its growing population. Saudi Arabia has one of the youngest populations in the Middle East, a lot of it unemployed and much of it poorly educated. Some 25 percent of the population lives in poverty. Money keeps the lid on, but for how long, even with the heavy-handed repression that characterizes Saudi political life?

In March, the Kingdom intervened in Yemen, launching an air war, a naval blockade, and partial ground campaign on the pretense that Iran was behind the civil war, a conclusion not even the Americans agree with.

Again, the Saudis miscalculated, even though one of its major allies, Pakistan, warned Riyadh that it was headed for trouble. In part, the Kingdom’s hubris was fed by the illusion that U.S. support would make it a short war—the Americans are arming the Saudis, supplying them with bombing targets, backing up the naval blockade, and refueling their warplanes in mid-air.

But six months down the line the conflict has turned into a stalemate. The war has killed 5,000 people, including 500 children, flattened cities, and alienated much of the local population. It has also generated a food and medical crisis, as well as creating opportunities for the IS and Al-Qaeda to seize territory in Southern Yemen. Efforts by the UN to investigate the possibility of war crimes were blocked by Saudi Arabia and the U.S.

As the Saudis are finding out, war is a very expensive business, a burden the Saudis could meet under normal circumstances, but not when the price the Kingdom’s only commodity, oil, is plummeting.

Nor is Yemen the only war that the Saudis are involved with. Riyadh, along with other Gulf monarchies, including Qatar and the United Arab Emirates, are underwriting many of the groups trying to overthrow Syria’s Bashar al-Assad. When anti-government demonstrations broke out in 2011, the Saudis—along with the Americans and the Turks—calculated that Assad could be toppled in a few months.

But that was magical thinking. As bad as Assad is, a lot of Syrians, particularly minorities like Shiites, Christians, and Druze, were far more afraid of the Islamists from al-Qaeda and the IS then they were of their own government. So the war has dragged on for four years and has now killed close to 250,000 people.

Once again, the Saudis miscalculated, though in this case they were hardly alone. The Syrian government turned out to be more resilient that it appeared. And Riyadh’s bottom line that Assad had to go just ended up bringing Iran and Russia into the picture, checkmating any direct intervention by the anti-Assad coalition. Any attempt to establish a no-fly zone will have to confront the Russian air force, not something that anyone other than U.S. presidential aspirants are eager to do.

The war has also generated a flood of refugees, deeply alarming the European Union, which finally seems to be listening to Moscow’s point about the consequences of overthrowing governments without a plan as to who takes over. There is nothing like millions of refugees headed in your direction to cause some serious re-thinking of strategic goals.

The Saudis goal of isolating Iran is rapidly collapsing. The P5+1—The U.S., China, Russia, Great Britain, France, and Germany—successfully completed a nuclear agreement with Teheran, despite every effort by the Saudis and Israel to torpedo it. And at Moscow’s insistence, Washington has reversed its opposition to Iran being included in peace talks around Syria.

Stymied in Syria, mired down in Yemen, its finances increasingly fragile, the Kingdom also faces internal unrest from its long marginalized Shiia minority in the country’s east and south. To top it off, the IS has called for the “liberation” of Mecca from the House of Saud and launched a bombing campaign aimed at the Kingdom’s Shiites.

Last month’s Hajj disaster that killed more than 2100 pilgrims—and anger at the Saudi authorities foot dragging on investigating the tragedy—have added to the royal family’s woes. The Saudi’s claim 769 people were killed, a figure that no other country in the world accepts. And there are persistent rumors that the deadly stampede was caused when police blocked off an area in order to allow high-ranking Saudis special access to the holy sites.

Some of these missteps can be laid at the feet of the new king, Salman bin Abud-Aziz Al Saud, and of a younger generation of aggressive Saudis he has appointed to key positions. But Saudi Arabia’s troubles are also a reflection of a Middle East in transition. Exactly where that it is headed is by no means clear, but change is in the wind.

Iran is breaking out of its isolation and, with its large, well-educated population, strong industrial base, and plentiful energy resources, is poised to play a major regional, if not international, role. Turkey is in the midst of a political upheaval, and there is growing opposition among Turks to Ankara’s meddling in the Syrian civil war

Saudi Arabia, on the other hand, is impaled on its own policies, both foreign and domestic. “The expensive social contract between the Royal family and Saudi citizens will get more difficult, and eventually impossible to sustain if oil prices don’t recover,” Meghan L. O’Sullivan, director of the Geopolitics of Energy project at Harvard told the New York Times.

However, the House of Saud has little choice but to keep pumping oil to pay for its wars and keep the internal peace. But more production drives down prices even further, and, once the sanctions come off of Iran, the oil glut will become worse.

While it is still immensely wealthy, there are lots of bills coming due. It is not clear the Kingdom has the capital or the ability to meet them.