If there’s one lesson from the 2016 U.S. presidential election, it’s that surprises are always possible—even if the polls say otherwise. On May 19th, Iranians will cast their ballots to elect the next president of Iran and it is useful to keep that lesson in mind.

Incumbent pragmatist President Hassan Rouhani won the 2013 election with a slim majority vote against a crowded field of conservatives, based on promises of greater civil liberties and bringing Tehran out of its international isolation. Although Rouhani kept his major promise by securing the Iran nuclear deal, he also overpromised to the Iranian people that the economy would bounce back quickly once Western sanctions were lifted.

A Trump presidency and uncertainty surrounding the stability of the nuclear deal have made foreign investors hesitant about returning to Iran. Unemployment has shot up 1.4 percent from the previous year and is still in double digits. Supreme Leader Ayatollah Ali Khamenei criticized Rouhani during an address on the occasion of the Iranian New Year saying that Rouhani didn’t meet the expectations of the leader or the Iranian people. That doesn’t mean all is lost. Inflation drastically dropped from 40 percent in 2013 to 10 percent in 2015. And the International Monetary Fund said the economy grew last year by 6.6 percent – although much of that is accounted for by a return to near pre-sanctions oil exports.

Many Iranians remain confident that Rouhani will have a second term.

Historically since 1981, Iranian presidents have won two terms even in controversial circumstances such as in 2009 when President Mahmoud Ahmadinejad’s re-election was marred by fraud and protests.

The post-election demonstrations were the largest demonstrations in Iran since 1979. The protests known as the Green Movement initially addressed voter fraud, then turned into a demand for reform and greater civil liberties. Security forces—the Islamic Revolutionary Guard Corps (IRGC) and people’s militia called the Basij—cracked down on protesters, throwing hundreds in jail and killing over 30. The protests eventually died down. The Green Movement’s leaders—defeated presidential candidates Mehdi Karroubi and Mir Hossein Mousavi and Mousavi’s wife Zahra Ranavard—were put under house arrest in 2011 and remain there.

This May marks almost eight years since the 2009 election. In recent months, there have been unsettling comments from the upper echelons of the Iranian government and recent arrests signaling a possible repeat of that tumultuous period.

During a speech to election officials in February, Rouhani said, “We all have to be careful that government resources are not used in favor of one individual or party. This is a sin. By government, I mean the executive, the judiciary, the armed forces.” While the president didn’t make specific allegations, he appeared to be referring to the 2009 elections. 

Weeks later, Khamenei delivered his annual Nowruz address. In it, he alluded to tampering in previous elections albeit without his consent. Khamenei said, “I will confront anyone who wants to tamper with the results of the people’s vote.”

The 2009 presidential election is often referred to as a coup by the IRGC. The Guards intervened in favor of their preferred candidate, Ahmadinejad, an IRGC veteran who named other veterans to his cabinet. The IRGC and Basij were able to mobilize behind Ahmadinejad by holding rallies, opening campaign offices, and intimidating opposition supporters. Later in 2010, the widow of an IRGC division commander wrote an open letter to commander Mohammad Ali Jafari accusing him of treason for interfering in the 2009 elections.

Typically, the Iranian government eases political restrictions before elections. However, since December, over 22 activists and journalists—mostly supporters of Rouhani—have been arrested by security forces. They include a dozen administrators of pro-reform channels on Telegram, a popular instant messaging app used by Iranians. Telegram helped mobilize Iranians against hardliners and get out the vote in last year’s parliamentary and Assembly of Experts elections.

Hengameh Shahidi, one of the 22 arrested and currently under hunger strike, wrote that her incarceration was part of a “project before the elections for the widespread arrest of political activists and journalists in order to secure votes for the candidate of their choice.” Shahidi once worked as an advisor to Green Movement leader Karroubi and was previously jailed in 2009.

The recent arrests prompted four reformist members of parliament to inquire who was behind the arrests—as in whether it was the Intelligence Ministry or the Guards’ intelligence arm. As a result, Rouhani asked his interior minister to look into the “suspicious arrests.”

A former IRGC commander and current MP, hardliner Mansour Haghighatpour,explained to a state newspaper last year that the Guards tried to use its leverage to make sure he lost a seat in the 2016 parliamentary elections because he supported the Iran Deal.

Hardliners oppose rapprochement with the West and have criticized the nuclear agreement as against Iranian interests. Similarly, the IRGC, which flourished under sanctions through the black market, haven’t benefited as much under Rouhani as under Ahmadinejad. The IRGC continues to test the limits of the nuclear deal by activities outside the parameters of the deal, such as ballistic missile tests, continued involvement in Arab civil wars in Syria and Yemen and harassing U.S. Navy ships in the Persian Gulf.

For the past few months, rumors swirled that influential cleric Ebrahim Raisi might be the next supreme leader when Khamenei passes away. Last year, Raisi was promoted to custodian of the Imam Reza Shrine in Mashhad, the Astan-e Qods Razavi, the largest such organization in the Islamic world. This promotion cast him in the Iranian media spotlight. 

Signs started in recent weeks pointing that Raisi might run for president. Raisi made public visits that are on par with U.S. presidential campaign “listening tours.” Then 50 out of 88 members of the Assembly of Experts, a body of clerics that would approve the next supreme leader and which Raisi is a member of, signed a letter in favor of his presidential candidacy. After weeks of speculation, finally, Raisi announced his presidential run.

Raisi has close ties to the Guards, intelligence circles, and Khamenei. He hasthe ability to unify the hardliners. Raisi may pose a formidable challenge to Rouhani. However, his role as one of four judges who sentenced thousands of dissidents and leftists to their deaths in 1988 might drive the vote against him. Rouhani remains relatively popular despite economic setbacks. 

Still, the Guards and Basij appear to be reasserting their interests. Khamenei might have kept them at bay in 2013 to restore political stability, but that was before the Iran deal.

Other wild cards are the actions of the Trump administration and the US Congress. Congress will reportedly hold off on new sanctions legislation prior to the Iranian elections. But Trump’s decision to strike Syria last week in retaliation for Syrian chemical weapons attacks on civilians could also impact Iranian calculations in unpredictable ways.

Holly Dagres is an Iranian-American analyst and commentator on Middle East affairs. She is also the curator of the weekly newsletter, The Iranist. On Twitter: @hdagres.