Tom O'Connor is a senior writer of foreign policy at Newsweek, where he specializes in the Middle East, North Korea and other areas of international affairs and conflict. He has previously written for International Business Times, the New York Post, the Daily Star (Lebanon) and Staten Island Advance.

Newsweek: The United States for four decades has made little secret of its desire to see Iran's revolutionary Shiite Islamic Republic fail, something that could now prove a win for Washington's interests in a region where its policies have more recently been defined by successive setbacks.

Far from bringing peace to the Middle East, however, a significant escalation of demonstrations shaking Iran or any major foreign intervention could end up empowering an even greater enemy—the Islamic State militant group. The organization better known as ISIS rose up years ago from the death and destruction ravaging Iraq and Syria and the jihadis have since sought to tap into movements battling the Iranian government from within, and make good on external forces pushing the country toward implosion.

The Islamic Republic's enemies both at home and abroad benefit from the current chaos across the country, but even Tehran's foes fear that the instability could create the conditions for ISIS to breed.

"Different groups hostile to the Iranian government, including ISIS, separatists or other ones, have and will take advantage of any unrest in the country," Abas Aslani, a visiting scholar at the Istanbul-based, non-profit, non-partisan Center for Middle East Strategic Studies and editor-in-chief of the Tehran-based Iran Front Page private news outlet, told Newsweek.

"Any collapse or weakening of a state in the region is likely to fuel into more instability in the region," he added. "This is also a concern of even opponents in Iran, in so that they are not sure in the case of the collapse of the current system in the country who will replace them and how the situation will be."

To Iran, the fight against ISIS was always an existential one. Just as the Pentagon began coordinating its own involvement in June 2014, Iran mobilized mostly Shiite Muslim militias in both Iraq and Syria in order to beat back lightning gains made by the Sunni Muslim insurgents that reveled in the mass slaughter of those deemed to be outside of their ultraconservative ideology.

This proved vital in turning the tide against the jihadis, who have been largely defeated in recent years.

Rodger Shanahan, a research fellow at the Lowy Institute's West Asia Program and former director of the Australian Army's Land Warfare Studies Centre, told Newsweek that "Iran was critical in providing logistical and advisory support to Iraqi paramilitary forces who battled ISIS in Iraq, particularly during the early days of the campaign." As for Syria, he said Iran's support for President Bashar al-Assad "also meant that it has contributed to the anti-ISIS campaign," but that "it is fair to say that that was by no means the aim of their support for Assad and the targeting of ISIS has been sporadic at best."

ISIS' so-called caliphate has since been destroyed, but special presidential envoy to the U.S.-led coalition against ISIS James Jeffrey estimated in August that there were about 15,000 militants left in Iraq and Syria. The math is fuzzy, as some members are believed to have joined other groups, gone into hiding or fled altogether. Even Jeffrey admitted this figure had "a standard deviation of significant thousands in either direction."

Despite battlefield losses, the group lives on through deadly sleeper cells and sophisticated media operations that non-stop broadcast propaganda. Tehran too has built a robust system of non-state actors also hostile to Israel, Saudi Arabia and the U.S and, while establishing this so-called Axis of Resistance proved a major strategic victory, it came at a steep price.

Iran's campaigns cost capital, both human and financial, and increasingly strict U.S. sanctions have choked up Tehran's access to disposable income. Though the Iranian government is believed to still have access to considerable wealth to run its operations, the dual effects of a U.S.-imposed trade siege and domestic mismanagement have made life more difficult for everyday Iranians unable to capitalize on the economic reforms promised by Iranian President Hassan Rouhani.

The Rouhani administration's decision last month to cut gas subsidies and ultimately transition to a welfare-based system had actually been in the works for some time and was supported by the International Monetary Fund. Still, the sudden shift appeared seismic for many Iranians accustomed to cheap fuel and citizens rose up with a rare intensity.

The government's reaction on the ground was swift and, against what at least officials claimed were rioters, deadly >>>