Rouhani effectively has a ten-month window push through economic reforms and encourage trade with the West before things start to go downhill.

Iran’s President, Hassan Rouhani, is under pressure. Two ticking clocks—the November 8, 2016 U.S. presidential election and Iran’s June 2017 presidential election—will weigh heavily on his mind as he attempts to build on the momentum of the January 2016 nuclear deal and push through needed economic reforms.

Regardless of whether we have a Hillary Clinton or Donald Trump victory in November, relations between Iran and the U.S. are likely to become more confrontational, with both candidates seeking to distance themselves from the perceived ‘leniency’ of President Obama.

Clinton has stated that, “As President, my approach will be to distrust and verify. I will vigorously enforce the nuclear deal as part of a comprehensive strategy that confronts all of Iran’s negative actions in the region and stand side-by-side with our ally Israel and our Arab partners.” Donald Trump last month took an even stronger stance, saying that his “number one priority will be to dismantle the disastrous deal with Iran. Iran has perpetuated terror attacks in 25 different countries on five continents. They’ve got terror cells everywhere, including in the Western Hemisphere, very close to home. Iran is the biggest sponsor of terrorism around the world. And we will work to dismantle that reach.”

As long as Tehran maintains its commitment to the Joint Comprehensive Plan of Action (JCPOA), the nuclear agreement between Iran and the P5+1, it will be difficult for any American president to walk away from the deal. However, Tehran will undoubtedly come under greater scrutiny and public criticism from Washington for testing ballistic missiles, supporting Hezbollah and Hamas and challenging American regional allies including Israel and Saudi Arabia.

When 10 American sailors were captured by Iran in January 2016, a flurry of phone calls between Secretary of State John Kerry and Iran’s Foreign Minister Mohammad Javad Zarif managed to secure their quick release and avoid a major incident. A more belligerent attitude by the next US administration will make such diplomacy much more difficult and it is unlikely that future incidents will be diffused as quickly. In effect, relations between Iran and the U.S. are likely to revert back to the tensions and recriminations that characterized the United States’ containment policy in the pre-Obama era.

In preparation for this shift in leadership and attitude towards Tehran, Rouhani has a ten-month window before the January 2017 inauguration to push through his economic reforms, encourage a meaningful return of foreign investors and engage the west. His 2013 presidential campaign success was predicated on these promises and now he has a limited time to deliver and maneuver. Specifically, he is seeking $50 billion in foreign direct investment to regenerate Iran’s energy industry and promote joint cooperation and investment in an array of sectors ranging from automotive to telecoms and petrochemicals. To do this, Rouhani must push through a basket of regulatory policy measures that will demonstrate transparency and stability such as banking reform, exchange rate stabilization, approval of the new petroleum contracts and anti-corruption measures.

At the same time, the clock is also ticking internally ahead of Rouhani’s own reelection set for June 2017 The President is at odds with Iran’s hardliners including members of the Iran Revolutionary Guard Corp (IRGC) who remain wary of relations with the west and his promises of social, cultural and economic liberalization. Unhappy with the outcome of the February parliamentary and Assembly of Experts elections that resulted in gains for moderates and centrists allied with the president, hardliners are looking to weaken the president’s domestic and international popularity.

Frequent ballistic missile tests that have provoked international criticism and U.S. sanctions have thus far proven to be an easy way of challenging the president. Aggressive public statements designed to antagonize Iran’s neighbors have also been successful and will continue in an effort to prevent Rouhani from building bridges between Iran and the Gulf states. This unpredictability could ultimately scare off international business and weaken Rouhani’s domestic support.

While Iranians have since the revolution repeatedly reelected their presidents, Rouhani must address the rising economic and political challenges to guarantee a victory. Amidst these mounting pressures, time is not on his side.