On Friday, Iranians will vote for their next president. The race has essentially boiled down to a choice between a centrist and a hardline conservative—the incumbent, Hassan Rouhani, and Ibrahim Raisi, the custodian of the shrine of Imam Reza in Mashad. A clear choice appears to be emerging. Polls in Iran, though not always reliable, are running strongly in Rouhani’s favor; sensible men in the leadership, having tampered with the election results in 2009 only to face massive street protests, are likely to advise abiding by the popular choice.

On the eve of the election, Rouhani’s confidence appears to be surging. In a hard-hitting speech before a huge rally in Mashhad on Wednesday, he urged the Revolutionary Guard commanders to heed the advice of the father of the revolution, the late Ayatollah Khomeini, and to refrain from interfering in politics and political parties. Referring indirectly to the Guards’ extensive involvement in business ventures, he said “institutions that wield both arms and a security apparatus should not narrow the field of operations for the private sector.” He also indirectly accused Raisi of misusing his office to attract votes, and his opponents of sending thugs into the streets to tear up his campaign posters.

Originally, six candidates were approved by the Council of Guardians, a body composed of six senior clerics named by Supreme Leader Ayatollah Khamenei, and six laymen (who must also be experts in Islamic law) selected by the Majlis, or parliament. The council is empowered to decide who will be allowed to run and who will be barred from running. Of the six approved by the council, Tehran mayor Mohammad Baqer Qalibaf, a conservative and hardliner like Raisi, stepped down on Monday in favor of Raisi. The next day, Vice President Is-haq Jahangiri, like Rouhani a moderate and an advocate of reform, withdrew and endorsed Rouhani. (Two other candidates, Mostafa Agha Mirsalim, a former minister of culture and a conservative, and Mostafa Hashemi-Taba, a reformist close to former president Mohammad Khatami, are not considered serious contenders.)

While Rouhani enjoys considerable advantages—his success with the nuclear deal, his efforts to bring Iran back into the the international community—there are limits to just what he can do to, say, revive Iran’s economy and ease tensions with its Arab neighbors in the Gulf. And in the shadow of the supreme leader and the Republican Guard, whether he can continue to effect real reform as a centrist is uncertain.

After going to the polls in 11 elections under the Islamic Republic, Iranians have become sophisticated voters who generally know who they want to see as their president. And they have reluctantly accepted the vetting system under which the Council of Guardians has routinely excluded more controversial candidates and, of course, unknowns. Despite the narrowing of choices, participation in presidential elections remains high.

For voters, re-electing Rouhani means opting for continuity and hope—hope that his promise of an economic opening and outreach to the West and to Iran’s Arab neighbors will improve the economy, ease tensions with the outside world, and invite less interference in the daily lives of Iranians, even as they know that control of the security agencies and the Revolutionary Guards will remain out of reach.

Raisi, by contrast, will mean not only an even more severe crackdown on dissent and social non-conformity, but continued tension with the outside world. His entrance into the race was an ominous reminder of the past. He is a 57-year-old cleric, a former prosecutor-general, and a member of the Assembly of Experts, the body that selects the supreme leader. He was implicated in the mass execution of thousands of left-wing political prisoners in 1988. The religious foundation that he heads, with its vast land holdings, investments, and industrial interests, is the wealthiest in the country, giving him considerable influence and powers of patronage. Along with Qalibaf, Raisi represents the camp of the “principlists,” the conservative faction in Iranian politics. But Raisi’s foreign-affairs experience is limited, especially in comparison with the savvy Rouhani.

Raisi is, however, a protégé of Ayatollah Khamenei. The supreme leader appointed Raisi to the key position of custodian of the Imam Reza Shrine, the mausoleum of the eighth Shia Imam, and the beneficiary of large religious endowments. Many observers think Khamenei’s intention all along was to raise his political profile and position him as the leading presidential candidate in the 2021 elections if he fails to win this time. He may also be grooming Raisi as a potential successor, no doubt much to the chagrin of Sadeq Larijani, the head of the judiciary, who also aspires to the office of supreme leader.

So far, however, in the three scheduled and televised presidential debates, and in campaign speeches, Rouhani has outshone Raisi with his superior command of both domestic and international issues. Ali Larijani, the speaker of the Majlis (and Sadeq’s brother) and the leader of the moderate conservatives, this week announced his group would support Rouhani for president, as did former president Mohammad Khatami, Faezeh Hashemi, the outspoken daughter of the late former president Akbar Hashemi Rafsanjani, and the Green movement leaders, Mir Hossein Mousavi and his wife Zahra Rahnavard, both of whom remain under house arrest.

Although Khamenei, as supreme leader, is Iran’s ultimate decision maker, the president still wields considerable influence in shaping economic, social, and other domestic policies. Except for the ministries of information, intelligence, and foreign affairs, where final say on appointments lies with the supreme leader, the president is generally free to select his own cabinet. However, the national broadcasting services do not answer to him; and like other recent presidents, Rouhani has exercised little authority over the military and the security agencies. He has largely failed to improve the human-rights situation in Iran. The number of executions rose during his tenure, as have the number of political prisoners—men, women, and dual nationals—arrested, tried on flimsy charges, and imprisoned.

While Rouhani did conclude a nuclear agreement with world powers—a clear success—his influence on Iran’s foreign policy has been limited. Iran’s policies and its role in Iraq, Syria, Afghanistan, Yemen, and Lebanon, are the prerogative of the Revolutionary Guards, and particularly of Qassem Soleimani, the commander of the elite Quds Force, who reports directly to the supreme leader. The Revolutionary Guards are also the channel for Iranian support for Hamas in the Gaza Strip, Hezbollah in Lebanon, and the Houthis in Yemen—support that has greatly aggravated Iran’s relations with the Arab states. Rouhani may have wished for better relations with America and the Arab states of the Persian Gulf. But his intentions have been undercut by the Guards, with the support of the supreme leader.

As a result of the nuclear agreement, Rouhani secured the lifting of a range of sanctions imposed on Iran by Washington and other world powers. The positive results have included a significant increase in oil exports, access to Iran’s frozen financial assets abroad, and some easing of damaging banking sanctions. Double-digit inflation has also been curtailed. But for various reasons, the promised and anticipated foreign-investment boom has failed to materialize. Some U. S. sanctions remain in place. Foreign investors are hesitant to engage with Iran given the uncertainties of the Trump administration’s antagonistic Iran policies. Unemployment and under-employment remain high. The economy, and Rouhani’s success or failure in addressing Iran’s deep-seated economic problems, has understandably been a major issue in the campaign.

In tomorrow’s election, Rouhani is counting on women, the young, and reform-minded supporters in the major urban centers and in the provinces to give him the edge over Raisi. Women helped elect Rouhani four years ago. While he was unable to overcome opposition in the conservative-dominated Majlis and appoint women to his cabinet, he did name four as vice presidents. He has also succeeded in opening up the social space and limiting the interference of the morality police in people’s daily lives.

Supreme Leader Khamenei, for his part, has not endorsed any of the six candidates. For him, the size of the overall vote and public participation is important—as it has always been—as a symbol of public support for the ruling system. Observers believe his own preference is for Raisi; and he has been mildly critical of the nuclear agreement, or America’s alleged failure to uphold its side of the bargain, and also of Rouhani’s failure to implement what Khamenei calls “the resistance economy,” by which he means a kind of self-sufficiency without need for foreign investment of reliance on foreign imports.

On the eve of the third and last presidential debate, Khamenei cautioned the candidates not to offer “encouragement” to Iran’s enemies and undermine the elections—a warning that seemed directed at Rouhani. The president has accused the Revolutionary Guards of having tried to undermine the nuclear agreement and he reminded voters of Raisi’s role in the 1988 mass executions.

However, the supreme leader must also weigh the current international situation. Iran faces a hostile administration in Washington. Israel remains an enemy. Relations with Saudi Arabia are strained and Iran’s Gulf neighbors are suspicious and wary of Iran’s regional intentions and ambitions. Above all else, Ayatollah Khamenei knows that in this moment Iran needs a foreign-policy team equipped to resolve tensions with its neighbors and realize its regional goals. He must know that Rouhani, his foreign minister, Javad Zarif, and their foreign policy team, are the ones best qualified to address these issues. These considerations may also shape who the supreme leader hopes will win in the coming elections, even though his inclinations tend towards a reliable hardliner.

A centrist supported by moderates, versus a conservative supported by hardliners in the establishment. Once again, Iranian voters face a clear choice.