Y.J. Fischer served in the U.S. Department of State from 2012-2016, including as assistant coordinator for implementation of the Iran nuclear agreement.

Iranian President Hassan Rouhani speaks in a Cabinet meeting in Tehran on Dec. 31. (Iranian Presidency Office via the Associated Press)

By most accounts, Iran’s recent wave of protests grew out of economic grievances, including high unemployment, a less than expected economic dividend from the 2015 nuclear deal, and even such day-to-day concerns as “a surge in prices of basic food supplies like eggs and poultry.” But it has morphed into a broader challenge to the policies of the Iranian regime. Protesters say their government devotes too many resources to its aggressive regional foreign policy and not enough on domestic priorities — demonstrating with slogans such as, “Leave Syria [or Palestinian territories] alone, do something for us!”

It would be a mistake for Americans to conclude that the protests are about us — the unrest speaks to politics that go beyond the Islamic Republic’s contentious relationship with the West. And it would be wrong to view these events solely through the prism of the nuclear agreement. But it’s fair to say the protests help illustrate that the Obama administration negotiated a better nuclear deal than many of its critics admit.

It shows that critics who said Iran would be empowered by the deal were wrong.

First, Iran did not reap the windfall from the nuclear deal that many feared it would. Even after many sanctions were rolled back, Iran did not get the economic benefits it was expecting — or that its leaders promised. Rouhani called the deal a “golden page” in Iran’s history and described it as an “opportunity to develop the country” and “improve the welfare of the nation.” But that boon has yet to materialize.

During the initial implementation of the nuclear deal, it was my job at the State Department to travel the world explaining to international banks and companies to what extent they could invest in Iran. I saw how continuing political and legal concerns kept multinational banks and companies from taking advantage of sanctions relief.

In part, this was by design. Many companies held off from entering Iran post-agreement because they knew the United States and the international community could snap back nuclear sanctions if Iran violated the deal, a part of the agreement President Barack Obama and Secretary of State John F. Kerry held to as a mechanism to ensure Iran’s compliance. Additionally, the Obama administration insisted that ballistic missile and human rights sanctions could be enforced, making it risky to do business in Iran while the regime continued its bad behavior in these areas.

As a result, while there has been a modest increase in foreign direct investment in Iran, its overall economy remains stagnant and the average Iranian has felt minimal benefit. Unemployment is over 12 percent, with youth unemployment around 29 percent. Inflation remains high while economic growth outside the oil sector lags. It’s no wonder Iranians are blaming their government for failing to deliver.

Second, the nuclear deal didn’t strengthen the Iranian regime’s hold on power. Opponents of the deal argued that it took pressure off the Iranian government at a time when international sanctions were squeezing it economically. They advocated tightening the screws on the government by increasing sanctions. In February, President Trump tweeted that “Iran was on its last legs and ready to collapse until the U.S. came along and gave it a lifeline in the form of the Iran Deal: $150 billion.” But now, with ordinary Iranians criticizing Iran’s supreme leader, Ayatollah Ali Khamenei, that argument isn’t aging well.

International powers entered the nuclear deal to curb Iran’s advancing nuclear capability. But an ancillary benefit was that it put the onus on the Iranian regime to translate the easing of sanctions and influx of capital into increased prosperity. Just a few years ago, 56 percent of Iranians blamed the United States and other Western countries for harming their economic circumstances; 47 percent blamed the United States for this; only 10 percent blamed their government. Without the deal, and the removal of sanctions that came with it, many rank-and-file Iranians would have had a harder time now blaming the economic management of their government.

Which suggests that responding to the current demonstrations with additional sanctions — as the Trump administration has hinted at to try to squeeze the Iranian government — would be a mistake. It would give the regime a scapegoat and a propaganda lifeline when it needs it most.

Finally, the nuclear deal didn’t cause Iran’s support for bad actors across the Middle East. Yes, Iran is promoting conflict from Syria to Bahrain, including providing weapons to the Houthi rebels in Yemen. Naval forces of Iran’s Islamic Revolutionary Guard Corps have harassed U.S. Navy vessels in the Persian Gulf and conducted ballistic missile launches meant to threaten Israel. All of this jeopardizes regional stability and it is in America’s interest to stop it.

But the nuclear deal didn’t provide the Iranian regime with the means or motivation to expand its regional aggression. The government is overextended, which has taken a toll on average Iranians, and is now animating the demonstrations.

There’s a lot going on in the country that has nothing to do with the nuclear deal, including the desire of many Iranians for a modern state and a government that isn’t corrupt, oppressive or preoccupied with meddling in the affairs of its neighbors. But today the nuclear deal is working, which is why before refusing to certify its compliance in October, Trump’s State Department twice certified Iran’s compliance with restrictions on its nuclear program.

And, so far, it has achieved its intended purpose: Iran dismantled its nuclear program in return for limited sanctions relief, reducing a nuclear threat but not making it easier for the regime to consolidate its agenda. Its dictators are increasingly exposed as bankrupt and brittle. The world is safer, not more dangerous. As Iran’s leaders grapple with upheaval that they can’t easily pin on the West, one thing we’re learning is that the Obama administration got this one right.