(CNN)Iranians are casting their votes Friday in a presidential election that could have serious implications for the future of the country and its relationship with the West.
A beginner's guide to Iran's presidential election
Iranian President Hassan Rouhani, a moderate cleric (by Iranian standards), is seeking a second term as he faces off against a range of hardline conservative candidates.
Here's everything you need to know about the vote.
Yes and no. Iran's president and parliament are democratically-elected, but the country's highest authority is the Supreme Leader, who is appointed for life and has the final say on all matter of foreign and domestic policy.
The Supreme Leader -- currently an ultra-conservative cleric named Ayatollah Ali Khamenei -- helps appoint the Guardian Council, an unelected panel of conservatives that decides who gets to run for president (and who doesn't). Many popular reformist candidates have been disqualified from running in recent elections.
The president does have considerable leeway to enact policy at home and abroad, by appointing thousands of officials in the country and building a significant power base. This allows him to steer the regime in unexpected directions, such as with Rouhani's landmark nuclear deal. Still, everything must be approved by the Supreme Leader.
Rouhani was a key player in the 2015 deal with the US and world powers to curtail Iran's nuclear program in exchange for sanctions relief, and has overseen a period of growing normalization of relations with the West.
A Rouhani win would mean that Iran could continue to move ahead with its end of the nuclear deal relatively uninterrupted. The deal is considered the landmark of Rouhani's tenure and he will be keen to see it through.
A hardliner win would pose a considerable threat to the continuation of the nuclear deal. Iran's conservative camp, backed by Khamenei, have been vocal critics of the deal. They've also criticized Rouhani for pandering to the West, signaling that a hardliner win would mean a shifting of diplomatic gears and a possible heightening of tensions with the international community.
The first round takes place on Friday, but if no candidate gets more than 50% of the vote, a runoff will take place on May 26.
There are five presidential candidates in this year's race, but only two are seen as viable contenders: the moderate incumbent Hassan Rouhani, and hardline conservative cleric Ebrahim Raisi.
Hassan Rouhani (moderate)
Rouhani is a moderate who is backed by Iran's reformist camp. His run for re-election is viewed as a referendum of sorts on the nuclear deal, which has yielded mixed economic results for Iranians.
Ebrahim Raisi (hardliner)
Raisi is widely seen as Khamenei's preferred candidate and has cast doubts on the benefits of the nuclear deal. The 56-year-old cleric was a member of the so-called "Death Commission", which presided over the summary execution of thousands of political prisoners in the summer of 1988.
Rouhani billed the nuclear deal as one that would thrust open the gates of economic opportunity, bring the country out of its isolation and create millions of jobs for Iranians.
The agreement has brought a string of billion dollar deals with Western firms for airplanes and oil exploration in Iran. But the benefits were largely stymied by a fall in global oil prices and US President Donald Trump's election, which introduced uncertainty for investors. For the average Iranian, the results have been lackluster.
Unemployment in Iran stands at 10.7%, according to the CIA's World Factbook. In 2016, GDP growth was 4.5%, recovering to 2014 levels after it plummeted to 0.4% in 2015. Before Rouhani took office, 15.5% of the country was unemployed.
When sanctions peaked between 2011 and 2014, Iranians saw their incomes drop by more than 20%, to just over $5,300 on average. At one point, the Iranian rial fell by up to 80%, the price of basic goods skyrocketed and the economy suffered a period of hyperinflation.
Sanctions have cost Tehran about $50 billion in lost revenue each year.
Khamenei has long touted the benefits of a so-called "resistance economy" that flouts the global marketplace as well as the international community. Iran's hardline candidates continue to toe that line.
The nuclear deal
Rouhani has had a tough time defending the trademark achievement of his presidency and his opponents have accused him of not making good on his promises. Iran's presidential debates have largely centered on the nuclear deal.
Uncertainty brought on by the election of President Trump, who is highly critical of Iran and has promised to "tear up" the deal, hasn't helped matters.
Rouhani has history on his side: no sitting President has failed to win a second term since 1981.
But Iranian elections can be unpredictable -- Rouhani himself was polling in single digits two weeks prior to the 2013 vote, before surging ahead and winning in a landslide after leading reformers called on their constituents to back him.
The key question is whether Iranians still buy Rouhani's moderate agenda -- or whether they're willing to elect a conservative president who could undo recent progress and once again isolate Iran from the world.