Iranians will head to the polls on Friday to vote in a presidential election that could significantly shift Tehran’s domestic political landscape and its ties with foreign powers.

It’s the first presidential election since Iran reached a historic 2015 agreement with six other countries over its nuclear programs, following decades of diplomatic tensions between Tehran and the West. Under then-President Barack Obama, the United States played a key role in negotiating the deal, in which Iran agreed to curb its nuclear capabilities in exchange for relief from stifling economic sanctions.

Iranian President Hassan Rouhani, who is now seeking re-election for a second term, promised the deal would lead to jobs, economic growth and prosperity for his country. But many Iranians feel he has failed to deliver.

Criticism of the agreement has also been raised by Obama’s successor, President Donald Trump, who has already soured U.S. relations with Iran by threatening to put Iran “on notice” and to “tear up” the deal. The Trump administration has not yet taken steps to renegotiate or dismantle the agreement.

Iran is playing with fire - they don't appreciate how "kind" President Obama was to them. Not me! — Donald J. Trump (@realDonaldTrump) February 3, 2017

Ultra-conservative cleric Ayatollah Ali Khamenei is Iran’s supreme leader, the country’s highest-ranking authority. He oversees the Guardian Council, which must approve any presidential candidates before they’re allowed to run for office. Khamenei has responded to Trump’s provocative rhetoric by sarcastically thanking him for revealing the “true face” of the U.S.

Rouhani will face off against three remaining challengers. His main rival is hardline cleric Ebrahim Raisi. Tehran Mayor Mohammad Baqer Qalibaf dropped out of the race this week and backed Raisi, shortly before Iranian Vice President Eshaq Jahangiri withdrew to support Rouhani. If no one wins a majority, there will be a second round of voting on May 26.

A Raisi victory on Friday would defy the polls and come as a political surprise, not unlike Rouhani’s own election in 2013. It could also forecast the slow death of the nuclear deal and increased pressure on Tehran from the Trump administration, according to Iran expert Suzanne Maloney of the Brookings Institute.

HuffPost spoke with Maloney on Tuesday about what to expect as the election approaches.

Do you think voters feel that Rouhani has delivered satisfactorily on his promises surrounding the nuclear deal?

I think it’s accurate to say that he has delivered on what he promised, which was economic improvement and relief from at least some of the sanctions that were most onerous in terms of Iran’s ability to interact with the international financial system. He has done a very good job in terms of some of the other systemic issues that had a direct impact on the daily lives of Iranians.

What he hasn’t done in the 18 months since the deal has been in implementation phase is fully transform the Iranian economy ― in part because so much of what constrains Iran’s growth is the structural issues that have been developed over the course of the past 38 years: the dysfunction in the banking system, labor laws that aren’t terribly conducive to job creation, an educational system that isn’t well-suited toward creating the kind of skill set that’s needed in a modern economy. And that’s only scratching the surface.

These are long-term issues. I think Rouhani has a team in place that appreciates the scope of the problem, but in pitching the nuclear deal to both the political elite and his own population, there was a tendency to oversell the benefits. I think Rouhani bears the blame for the inflated expectations of many within the population.

Rouhani is the incumbent, but it seems as if he’s campaigning like an anti-establishment political outsider. Can you shed some light on his strategy?

I’ve seen echoes of his 2013 campaign, when despite the fact that he’d spent his entire political career within the system of the Islamic Republic, he actually campaigned as something of an outsider and seemed to try to co-opt the messaging of the reformist political faction, with whom he was not directly identified prior to his presidency.

He’s doing very much the same this time around. He’s using rhetoric that resonates with those who are disaffected from the system and who are frustrated about the lack of political and social freedom. Again there’s a danger in this, which is of course that Iranians aren’t blind to the fact that there was very little progress made in these areas during his first four years in office. It’s not clear whether going back to that is necessarily going to be as credible this time around.

If Rouhani wins, do you think his leadership style will change drastically?

No, I think we’ll see the same Rouhani: someone who’s a fairly astute politician, who knows how to navigate the very profound complexities ― ideological and bureaucratic ― of the Islamic Republic, who is focused primarily on economic reform and on rehabilitating Iran’s stature in the world, and who may believe in the long run that political and social change will come along with that, but isn’t going to prioritize those things in any serious way.

Getty Images Iranian President Hassan Rouhani (left) goes before the voters on May 19. His main rival for re-election is hardline cleric Ebrahim Raisi.

What are the most significant differences between Rouhani and Raisi as presidential candidates?

There are a lot of commonalities. They’re both clerics who’ve spent their political careers as functionaries of the Islamic Republic, but where they’ve spent that time matters greatly. Rouhani ― both in terms of his experience during the [Iran-Iraq] war, as well as his five terms in Parliament and his effective role as Iran’s national security adviser for a number of years ― has a much broader appreciation of the policymaking challenges that Iran faces on a day-to-day basis.

Raisi, by contrast, has spent most of his career in the judiciary, which is very much the kind of iron fist of the regime in terms of maintaining control and precluding social and political change. Raisi has a track record of absolute horror. He has been involved with some of the darkest and bloodiest episodes of repression in Iran ― beginning in the 1980s, but very much up through the 2009 protests and the torture of those who were imprisoned in the aftermath.

Raisi has a very different understanding of both the Islamic regime and of Iran’s role in the world. It would be a tremendous step backward for Iranians if they in fact had a leadership that was comprised of someone with such a track record.

Where does Supreme Leader Ayatollah Ali Khamenei stand as the election looms closer?

The supreme leader holds ultimate authority in Iran and he has within his disposal the direct line of control over the security bureaucracy and the judiciary, so he really does dominate the political scene within Iran. I think it’s clear that he has put a finger on the scale for Raisi’s candidacy. There wouldn’t be a Raisi front-runner status were it not for a continuous effort over the past six to nine months to ensure that any other conservative of stature was forced out of the race.

Whether or not that extends to doing whatever’s necessary to get Raisi elected, I think we just really can’t say. Some of the polling that’s coming out of the Revolutionary Guard news outlets suggests Raisi is in fact in the lead, very much in contrast to more established polls that are done in Iran. It worries me that there’s a decision to throw this race his way.

That doesn’t suggest that Raisi doesn’t have a base. I think that there’s clearly 10 to 12 million voters at minimum for Raisi, but you know, it’s a 55 million voter electorate. It would shock me if Raisi were to win fair and square.

What does this vote mean for the nuclear deal and for U.S.-Iran relations?

All the candidates in Iran have in fact supported the nuclear deal, precisely because it has the backing of the supreme leader. I think that was implicit in the fact that it was approved in the first place ― it couldn’t have been done without Khamenei’s support. That said, if Rouhani were to lose, if his foreign minister were to leave office, I think the Iranian investment in that agreement would abate significantly.

The sort of implicit understanding that this is a necessary or even a useful condition for Iran’s diplomacy and economic growth ― which is core to Rouhani’s agenda ― is not core to Raisi’s agenda. We’ve seen in the past that Khamenei is in fact prepared to walk away from agreements if he feels over time that Iran hasn’t gotten the best of the deal.

So I would say that if Raisi wins, the deal doesn’t fall apart the next day or even the next month, but it will erode almost inevitably as a result of the lack of commitment from Iran and the pressure that the Trump administration is going to apply.

If Raisi wins, the [Iran nuclear] deal doesn’t fall apart the next day or even the next month, but it will erode almost inevitably. Suzanne Maloney of the Brookings Institute

Raisi’s not going to walk away from the deal ― it’s a question of when and how Khamenei would. He’s going to have an easier time walking away from the deal with a president who isn’t personally invested in it.

The other factor of a Raisi presidency is it would pave the way for Trump administration pressure, whether it’s sanctions or regional pushback. The optics of an Iran that’s led by someone with blood on his hands [and who’s] prone to irresponsible or even reprehensible rhetoric would begin to create a narrative to which other countries around the world may [become] more susceptible.

It will take time. It will take diplomatic effort. It will take probably a more coherent embrace of this agenda than the Trump administration has shown to date. But they’ll go a lot further in terms of putting pressure on Iran with Raisi as president than with Rouhani.

Is Trump a factor on Iranian voters’ minds? Or on the supreme leader’s agenda?

It’s hard for me to say, but I think Iranians, like most people, vote on the basis of issues that concern their daily lives. At present, Trump is a dark shadow for Iran, in terms of a prospective threat, and he is also a factor of some amusement. But the Trump presidency has not yet made itself felt on the lives or livelihoods of individual Iranians, so I think they’re going to vote on the same kind of pocketbook issues that most people do around the world.

As for the supreme leader, it’s a good question. There will be those who will argue that the supreme leader sees a hardening American position and wants to respond in kind, and that may be part of the thinking. But I think that whatever the explanation for Raisi’s sudden emergence onto the scene, I think it has more to do with Khamenei’s own longevity and sense of his own [mortality] than it does with anything that’s happening here in Washington.

In a sense, for Khamenei, every American president is just a variation on a theme of interventionism and bullying and regional disruption. I think in the end, Raisi’s candidacy is a signal that Khamenei is thinking about his own legacy and how best to ensure it.

This interview has been edited and condensed for clarity.

PHOTO GALLERY Historic Iran Deal