While the world looks to next month’s U.S. election for clues on the future of the standoff with Iran, candidates are preparing for another vote that may prove just as pivotal. Next June, Iranians will also elect a new president, as the era of Hassan Rouhani, who staked his career on clinching the historic nuclear deal with world powers in 2015, comes to an end, his legacy upended by hardliners in the U.S. and at home.

Though Iran has rolled back compliance to key commitments in the deal, resuming enrichment beyond the agreed limits as Trump reinstated and tightened sanctions, it has not officially repudiated the agreement and has indicated its violations could be phased out if penalties are lifted. Tighter U.S. sanctions have caused Iran’s oil exports to plummet. Crude production has halved since mid-2018 to less than 2 million barrels a day.

hardliner will have little incentive to formally abandon an accord that could yet present a lifeline for Iran’s devastated economy, but may not return to the table on the same terms as before or be willing to simply reactivate the pact as is, even if Democratic challenger Joe Biden wins the Nov. 3 vote. Biden, vice president in the Obama administration when the agreement was reached, has indicated he would seek to revive it.

European nations, China, and Russia have clung to the accord, holding out for a change of heart or leadership in the U.S. And Iran is hedging its bets. Iranian moderates aren’t being entirely cast out because many, like Foreign Minister Mohammad Javad Zarif, have technical skills and diplomatic experience that’ll be needed should talks resume.

“It’s likely that we will see hardline factions competing for the position and for them, victory for Donald Trump is an opportunity because it gives them an opportunity to consolidate power,” Sanam Vakil, deputy director of the Middle East North Africa Program said. “If Biden wins, the system is faced with a choice, you need someone who brings relief and gets a deal. You need someone who has relationships and knows the terrain.”

Here are some of the names dominating discussions about who might be Iran’s next president:

1. Mohammad Bagher Ghalibaf – Head of Iran’s Islamic Consultative Assembly

A former police commander, veteran of the Islamic Revolutionary Guard Corps (IRGC) and ex-mayor of Tehran, Ghalibaf is a pragmatic hardliner: he presents himself as a modernizer while keeping religious classes satisfied with conservative values. He’s been somewhat tarnished by corruption allegations and is disliked by pro-reform voters but broadly supported the nuclear deal and, as mayor, oversaw major projects involving foreign investment, mostly from China.

He’s an ambitious politician who’s already made three attempts at the top job and sought in recent years to fine-tune his image.

2. Hossein Dehghan – Aide to Khamenei and former minister of defense

Dehghan made the rare gesture of openly declaring his candidacy. It’s likely an effort to test the idea with voters and the political class, particularly circles surrounding Khamenei, whom he advises. The fact he’s been open about his plans so early on suggests he either has tacit approval from the Supreme Leader or knows he’ll get it.

A veteran of the IRGC and the Iran-Iraq war, Dehghan served both reformist and hardline presidents. His profile is conservative but his proximity to Rouhani and service under reformist president Mohammad Khatami lend him some credibility with moderate voters. He’s said he wants to “save the people from the current situation,” suggesting he wants to resolve Iran’s stand-off with the U.S.