Who are the leading candidates?

■ Hassan Rouhani, the incumbent, favors engagement with the West and greater personal freedom. He is responsible for the nuclear deal that relaxed economic sanctions on the country.

■ Ebrahim Raisi, a hard-line conservative challenger and a former prosecutor, favors greater homage to Iran’s Islamic revolutionary ideals and more economic self-reliance. He has criticized the nuclear deal and Mr. Rouhani’s failure to revive the economy.

Who is favored to win?

Polls and anecdotal evidence point to Mr. Rouhani, but Iran’s elections are notoriously unpredictable.

How is the winner chosen?

Whoever gets more than 50 percent of the ballots cast by Iran’s 55 million eligible voters wins.

Why does the outcome matter?

The vote is essentially a referendum on the future of Iran’s population of 80 million, many of them born after the 1979 revolution. Young people yearn for more personal liberties.