When the Iranian protests broke out last Thursday, I immediately reached out to friends, family, and organizers of the Green Movement, which erupted after the 2009 stolen elections, to find out what was going on. But almost everyone I spoke to gave me the same answer: We don’t know. We haven’t been able to piece it together yet. We are all confused.

But one person had quickly managed to put together the Persian puzzle: Donald Trump.

Although it took him days to figure out what was going on in Charlottesville, Iran was a piece of cake for America’s most unpresidential president. Since then, he has shot off half a dozen or so tweets purporting to support the protesters. In reality, however, the tweets seem more aimed at fanning the flames than aiding the demonstrators.

There is no evidence that the protesters in Iran are taking their cues from Trump—or even paying attention to him. Unlike the 2009 protests, when some of the demonstrators called on Barack Obama to speak out against the Iranian government’s brutal crackdown on peaceful protesters, no chants have been heard in Iran calling on Trump to do or say anything at all. Nor has any evidence emerged to substantiate the accusation that the protests were orchestrated from abroad.

Indeed, in the eyes of most Iranians, Trump has shown nothing but animosity toward the Iranian people since he took office. He imposed a Muslim ban on the Iranian people (even though no Iranian national has been involved in any lethal act of terrorism on US soil), while unreservedly hugging Iran’s regional rival and one of the main sources of Salafi terrorism, Saudi Arabia. He has continuously opposed and undermined the nuclear deal, which the Iranian people strongly support. He even blamed Iran instead of ISIS when that group conducted a terrorist attack in Iran that left 17 people dead.

But listened to or not, Trump has nevertheless contributed to the explosive mix of factors that gave birth to the Iranian protests.

Mindful of the ongoing political repression in Iran, the widespread discontent with lack of political and social freedoms, and the deep frustration and anger over corruption, economic mismanagement, and inequality, the question that analysts wrestle with is: Why now? Clearly there have been decades of pent-up anger. But that still doesn’t explain why emotions boiled over now, and not a year ago.

The answer appears to lie in a few factors that have all come to a head in the past few weeks. Trump has figured prominently in the first factor: the economic dividends of the nuclear deal.

The Iranian people had high hopes for the nuclear deal. Not only did it prevent a war with the United States that appeared increasingly likely; they expected it to help break Iran out of its economic and political isolation. Iran is a young country, with a labor force that grows 2.5 percent annually, which will require roughly 3 million new job opportunities by 2020. And beyond jobs, Iran’s youth want to connect with the outside world and be part of the global community, rather than stand on the outside looking in.

On paper, the nuclear deal has paid economic dividends. Iran’s real GDP will expand by 3.8 percent in 2018, according to the IMF. But this growth is largely driven by oil sales, which increases the government’s coffers but does far less to benefit the private sector. More importantly, however, oil sales do not create jobs, which is a major problem since unemployment rates among young people aged 15 to 29 is well over 24 percent.

Investments, however, do create jobs. To meet the needs of its growing labor force, Iran needs an estimated $150 billion in foreign investments. But those investments require financing from major banks, which, in turn, require confidence that the nuclear deal will endure, lest Iran once again comes under US sanctions that would render such investments illegal.

And this is where Trump comes in. While banks have been hesitant to finance projects in Iran for a variety of reasons, including corruption, bureaucratic red tape in Iran, and concerns about the heavy-handed presence of the Islamic Revolutionary Guard Corps (IRGC) in the Iranian economy, the primary barrier has been political uncertainty about the durability of the nuclear deal. Banks are loathe to begin financing investments since they could see those projects fall under sanctions if (or once) Trump pulls the plug on the whole deal.

The never-ending drama about whether Trump will or will not kill the deal has been designed to achieve exactly this: create uncertainty about the deal’s future in order to deter investors from entering the Iranian market. This absence of investment, in turn, has contributed to growing unemployment and unmet expectations about the direction of the Iranian economy—an underlying cause of these protests.

If the nuclear deal and the sabotaged sanctions-relief process created unmet expectations, it was the government’s proposed 2018 budget that left the population seething. The leaked budget proposed slashing subsidies on basic goods, including food and services for the poor, while increasing fuel prices by as much as 50 percent. But while poor people would have to face austerity, opaque religious institutions controlled by conservative political elements would be spared from austerity cuts, as would the IRGC.

So when hard-liners in Mashhad tried to capitalize on the population’s growing frustrations by organizing a rally against centrist President Hassan Rouhani, they got more than they had bargained for. Spontaneous protests began erupting throughout the country, particularly in smaller cities, which also tend to be the hardest hit by the austerity measures. These crowds were not protesting just Rouhani, however, but rather the regime as a whole—up to and including Supreme Leader Ayatollah Ali Khamenei.

Even though protests appear to have fizzled out over the past two days, the population’s anger and frustration will remain until the Rouhani government takes concrete steps to address the protesters’ legitimate grievances. While Rouhani can—and should—make changes to the budget, he has less control over the deeper problem of unemployment and the absence of foreign investment. And whatever difficulties Rouhani has had in convincing banks to finance investment thus far, he will face a far more challenging situation if Trump follows through on his promise to terminate the nuclear deal next week by not renewing sanctions waivers on Iran.

Precisely because Trump doesn’t care about the protesters and is more interested in destabilizing Iran and undoing anything and everything with Barack Obama’s name on it, he may well use the protests as a pretext to do what he has always intended to do: Kill the nuclear deal.

The only deviation from Trump’s original plan is that he could now pretend to do it out of love for the people of Iran.