Oh, great: the world can now look forward to two petro-states run by religious extremists with international ambitions for their sectarian agendas—and unlimited resources with which to pursue them. The removal of economic sanctions on Iran, as part of the nuclear agreement announced today, would free the Islamic Republic to seek parity with its hated rival, Saudi Arabia.

You could argue that Iran is already Saudi Arabia’s mirror image—Tehran’s Shia theocracy reflecting Riyadh’s Sunni-fundamentalist visage. But, constrained by economic sanctions, Iran has lacked the resources to match Saudi Arabia’s influence. They may never be equals, but without the economic restraints, the Islamic Republic will have the ability to spread mayhem across the Middle East, more overtly, more effectively, and with more immediate destabilizing consequences, than the kingdom ever has.

Even if the US Congress decides Iran isn’t keeping to the deal and imposes new sanctions, the Obama administration would not be able—if indeed it were inclined to try—to get the other Western powers to go along, much less Russia or China. Although the negotiators have until the end of June to work out the nitty-gritty of the Lausanne arrangement, the other members of the P5+1 have signaled they will drop sanctions as soon as Iran has complied with the terms.

And given what Iran has managed to do with its few resources thus far—protecting Bashar al-Assad in Syria, supporting Hezbollah in Lebanon and Hamas in Gaza, backing the Houthis in Yemen, and building new militias in Iraq—it is frightening to contemplate how much more havoc the regime will wreak when the sanctions shackles come off.

Those who welcome the Lausanne arrangement will suggest it marks the start of Iran’s rehabilitation as a responsible, constructive member of the comity of nations. The regime will allow political and economic liberalization, and ordinary Iranians will become shiny, happy people holding hands. As I have argued, this is the least credible outcome. Far more likely, the Iranian regime will use the financial windfall from the lifting of sanctions—$1.6 billion a month in oil revenue alone—to expand its corrosive influence in the Middle East, and beyond.

Every country with a sizable Shia community—especially Shia communities with grievances—must now worry about Iranian influence growing in their midst. Shia mosques, schools, and other institutions will turn to Tehran for financial aid, and some of it will come with strings attached. Just as Saudi largesse spreads the Wahhabi cult throughout the world, so too will Iranian assistance promote Tehran’s state doctrine, couched as a “revolutionary” ideology, which calls for political power to be checked and controlled by the clergy. If Tehran has lagged Riyadh in spreading theological poison, sanctions relief will give it the opportunity to catch up.

An area where Iran will work furiously to restore its early lead is in the export of violence and terror. Tehran has a longer history here, having midwifed the birth of Hezbollah in the early 1980s. Terrorist groups spawned by the Wahhabi ideology—al-Qaeda, ISIL, et al—currently dominate the jihadi landscape, but Iran’s proxies are now on the ascendancy in Iraq and Yemen, and are already well entrenched in Lebanon. In Syria, they have fought ISIL to a draw, but Iran will now look to tip the balance in favor of Assad, backed by Hezbollah.

If recent history is any guide, the regime in Tehran will seek to broaden its influence. If I had to predict where Iranian influence would grow fastest, I would look to Afghanistan, where the Shia minority will come under greater threat from the Sunni Taliban and ISIL when US forces leave; and, just possibly, to Pakistan, where the Shia face progressively greater repression at the hands of the Sunni majority.

Saudi Arabia is already responding to the Iranian ascendancy: Just look at Yemen, now caught in the crossfire between Riyadh and Tehran. Again, history suggests that, rather than direct military confrontation, the Saudis will respond to Iran’s proxies with fifth columns of their own. Since it can no longer be seen to support al-Qaeda and ISIL, Riyadh will find new groups to back from within Sunni populations anxious about the rising Shia tide.

The escalation of hostilities by proxy is inevitable: Its coffers expanded by the removal of sanctions, Iran will try to match Saudi Arabia in spending. Though Riyadh can muster more allies—there are, for instance, 10 nations in the coalition currently bombing Yemen—Tehran’s proxies have greater fighting experience, which will be fortified with shiny new weapons gifted by their newly-flush sponsors. Iran can also dispatch battle-hardened commanders like Qassem Soleimani (paywall) to lead its surrogate legions.

What does it all mean for the rest of us? For the Middle East, the danger represented by a contest between the Islamic Republic and the kingdom is clear and present. For the wider Muslim world, it is serious and imminent. For the world at large, apart from the obvious humanitarian calamities in store and the economic impact of tensions between two giant oil producers, there’s also the certain knowledge that furies unleashed in the Middle East have a tendency to travel far beyond the region, with devastating consequences.

And for the US? We’ve already had a glimpse of the complexities Washington now faces in picking sides: American aircraft are helping Iran’s proxies in Iraq, even as American intelligence is helping the Saudis bomb Iranian proxies in Yemen. It is impossible to know which side the US will need to support in the next flashpoint. In a Middle East dominated by two poisonous petro-states, your enemy’s enemy is your friend. And your enemy. And your friend’s enemy. And your enemy’s friend. Yes, all at once.