The current crisis between Iran and Saudi Arabia started on Saturday when Riyadh executed a prominent Shiite cleric, Sheikh Nimr Baqir al-Nimr, and in response an angry mob was allowed to set fire to the Saudi embassy in Tehran. Saudi Arabia then announced it was breaking off diplomatic relations with Iran, and was followed in that step by Bahrain and Sudan. But this week’s events were only a spark to very dry tinder. Iran and Saudi Arabia view themselves as engaged in a set of proxy wars for control of the Middle East. This is not a budding hot war, and not a Sunni-Shiite struggle, though each side attempts to use ideological affinity as a recruiting tool. Rather, it is a power game, reminiscent of the Cold War between the United States and the Soviet Union.

Why have Iran and Saudi Arabia gone toe to toe in the region? First, they believe that they have emerged as regional powers, and since the 19th century, great powers and regional powers have spheres of influence over small countries. Second, the uneasy balance of power between the two has been upset. It was first disturbed by the Bush administration’s overthrow of secular Sunni power in Iraq in favor of pro-Iranian religious Shiite power, which shifted Iraq in some important ways from the Saudi to the Iran side of the ledger. The balance of power was further upset in Yemen, Bahrain, and Syria, by the revolutions and wars that began in 2011. These events imply that Riyadh and Tehran might not be able to maintain the status quo, and that the balance of power in the Middle East may tip toward one or the other when the smoke clears. Each wants to be on top when that day comes.

Saudi Arabia and Iran have cut off diplomatic ties before, as in the 1990s, but in 1997 they were restored when reformist Mohammad Khatami won the presidency of Iran. Analysts agree that there is little prospect of the two countries’ going to war. The United States lends Saudi Arabia, which produces about 11 percent of the world’s petroleum every day, a security umbrella and would never countenance an Iranian attack. Even if the United States weren’t in the picture, it just isn’t a very likely scenario at this time. Iran is a country of some 78 million with an experienced army of over half a million and some 800,000 Basij irregulars. But note that a lot of its military resources are sewn up in Syria. Saudi Arabia is a country of 17-20 million citizens with a largely untested army of a little over 200,000. American military doctrine is that a country should only attack with a three-to-one manpower advantage. This principle suggests that Saudi Arabia is very, very unlikely to begin hostilities with Iran. Nor is there any sign that Iran wants a hot war.

The two countries do not share a land border. Neither has much of a navy, and while the Saudi air force is respectable, the Iranian air force is a joke. As oil producers, both would be economically crippled by any hostilities that spun out of control. Even during the Iran-Iraq War of 1980–88, a viciously fought replay of World War I with trench warfare and mustard gas, the two countries only occasionally struck at each other’s oil facilities, yet the price of petroleum plummeted from $40 a barrel to less than $10 a barrel during the course of the war.

Rather, Iran and Saudi Arabia both want to shape their geopolitical security environments, establishing firm spheres of influence from which the other is excluded. Just as the United States was willing, under the Monroe Doctrine, to face down the Soviet Union over missiles in Cuba in 1962, so Saudi Arabia sees itself as confronting an Iranian-backed challenge, the Houthi militiamen, in Yemen. The Saudis are either misrepresenting their motives in Yemen or they fundamentally misunderstand its Zaydi Shiites (who have little affinity for Iran’s hierarchical clerical Shiism, and who in some ways are close to some Sunni positions). The Saudis code the Houthis as Iran proxies, even though there is no evidence for any significant Iranian aid to the latter.

Just as the political collapse in Yemen and the takeover of Sana by the Houthis over a year ago pushed Saudi Arabia to intervene there, the prospect of the Baath regime of Bashar al-Assad being overthrown pushed Iran to send aid and troops to Damascus. Tehran also convinced Lebanon’s Hezbollah to enter the fray on the side of Assad, preserving the Syrian land bridge for Iranian resupply of munitions to its Lebanese client. The Iranian investment in Syria has nothing to do with Syrian Shiism. Iran’s allies in Syria are an assortment of Christians and Sunni secularists and New Age Shiites (the Alawites) with a gnostic and mythological approach to religion that bears about as much resemblance to clerical Iranian Shiism as Theosophy does to Episcopalianism. Besides, the Alawites who run the Baath regime in Syria are atheists.

Saudi Arabia saw an opportunity to have an Iran ally overthrown in Damascus as the revolution of 2011 turned into a civil war, and Riyadh is backing hard-line Salafi fundamentalist groups because they have the most motivation to end Baathist rule and have proven themselves the best fighters and the best recruiters of other foot soldiers. But if it had suited them and they could have found effective secular allies, the Saudis might well have been happy enough with that arrangement, too. The important thing to King Salman is to see Assad overthrown, both because he has massacred small-town and rural Sunni conservatives and because he is allied with Iran.

In addition to a search for exclusive spheres of influence, Iran and Saudi Arabia have internal security issues for which they blame one another. Some 15 percent of Saudis are Shiites, mostly in the Eastern Province, who are routinely humiliated and discriminated against. That province is of great strategic importance, because Saudi petroleum lies under it. The Saudi Shiites are Arabs, not Iranians, and most follow Grand Ayatollah Ali Sistani in Iraq. But Riyadh interprets all civil disobedience by Shiites in the kingdom as at the instigation of Iran. Hence, they saw dissident Sheikh Nimr as an Iranian secret agent. The Saudis presented no proof of their vague charges against him (that he was “involved in” fomenting rebellion or terrorist attacks). They haven’t shown that Nimr killed anyone or wanted to kill anyone. But there has been unrest in the Eastern Province among young Saudi Shiites, who feel as though they live under a sort of religious Jim Crow, and Nimr was the sacrificial lamb for that unrest. Likewise, at least 8 percent of Iranians are Sunnis, and Iran is afraid of Israeli and Saudi instigation of those communities.

It is understandable that outside observers might see all this as a religious struggle, until we begin considering the details, and then that narrative falls apart. Saudi Arabia has often adopted a pragmatic foreign policy and is not always aligned with Sunni religious movements. Riyadh backed the nationalist Egyptian officer corps in their overthrow, with massive popular support, of the Sunni religious party, the Muslim Brotherhood, in the summer of 2013. Saudi Arabia supports the secular PLO in Palestine against the Sunni fundamentalist Hamas movement. It supports the nationalists around president Abdu Rabbu Mansour Hadi in Yemen. It supports the secular-minded Sunni politician Saad al-Hariri in Lebanon. To see Saudi foreign policy as always in search of shifting Sunni neighbors toward a fundamentalist religious government flies in the face of the facts.

It has been some time since most Iranian high officials took seriously their country’s official ideology, of Khomeinism or the premise that Shiite clerics should rule Shiite societies. Nor has Iran been able to convince anyone else in the region of these principles. Most Lebanese Shiites are secular-minded, and if they vote for the pro-Iranian party-militia Hezbollah, it is because they think it will protect them from Israel and from Sunni radicals. The Iraqi religious authorities in the southern Iraqi city of Najaf, the Vatican of Arab Shiism, have rejected Khomeinism and support democratic elections. Most Pakistani and Gulf Shiites follow Ayatollah Sistani in Najaf, not Iran’s leader, Ali Khamenei. Not only does Iran not really have any close ideological soulmates among regional states, but it often cultivates Sunnis. Iran has excellent relations with Sunni Tajiks and Uzbeks in Afghanistan, and even seems to have feelers out to the Taliban. Although relations have been strained in the past three years between Sunni fundamentalist Hamas and Shiite Iran, for a long while Iran supported the latter, and appears willing to do so again.

There are some countries in the region that Saudi Arabia and Iran are forced to share, and they point the way forward. Oman tries to be an honest broker. Iraq has refused to cut ties with Saudi Arabia despite Shiite demonstrations against Sheikh Nimr’s execution. Dubai has good relations with both countries. Lebanon tries to stay on the good side of both, though nowadays it tilts toward Iran because its Shiites, Christians, and secular Sunnis fear Salafi Sunnis of the sort the Saudis are backing.

Oman and Iraq have announced an attempt at mediation, and perhaps as a result of the embarrassment of a UN Security Council resolution condemning the attack on the Saudi embassy in Tehran, Brigadier General Mohsen Kazemeini, commander of the Tehran division of the Iranian Revolutionary Guard Corps, called the assault a “fully organized” move, from which he distanced the officials of the Islamic Republic. Iran’s failure to protect the mission or swiftly condemn the arson had raised alarms in Riyadh that it was directed by the government.

A big part of the problem here is overweening ambition. Neither Iran nor Saudi Arabia is actually in a position to act as a regional power with an exclusive sphere of influence. Saudi Arabia’s population is too small for that, and Iran is too poor. Neither has an ideology much liked by neighbors. That is why Saudi’s Yemen war is turning into a quagmire, and Iran had to beseech Russia to come in and rescue Assad in Syria. The Syrian and Yemeni wars will end most quickly if a formula can be found for power-sharing among the belligerents, so that neither Tehran nor Riyadh is entirely cut out of the deal. Neither may be happy at not winning completely, but long, drawn-out wars are always pyrrhic and have a high cost in refugees and in blood and treasure.