As Iranians prepare to head to the polls on Friday to cast their vote for president, the political climate in Iran is heating up.

Iran's centrist-leaning president, Hassan Rouhani, faces an uphill battle to secure a second term. A poll conducted by the Iranian Students Polling Agency last week showed that while Rouhani remains in the lead with 41.6 percent, two conservative opponents are catching up.

Rouhani struggling to keep firm lead

Consequently, Rouhani has changed his campaign rhetoric this week by criticizing his rivals, including the powerful Iranian Revolutionary Guard Corps. The change of tone, some experts say, is reminiscent of Rouhani's 2013 presidential campaign strategy.

"Iran's president is simply reverting to the anti-establishment campaign strategy that served him well the first time around," wrote Suzanne Maloney, deputy director of the Foreign Policy program at the Brookings Institution, in the Washington based think-tank's blog. "So it's hardly surprising that Rouhani is going back to his old playbook of calculated provocation ... "

As the candidates enter the final stretch of this surprisingly tight presidential race, we break down how Iran's presidential elections work and what it might mean for the United States.

Q: Do presidential elections in Iran even matter?

A: Yes.

Although Iran's electoral process is far from being free and fair, presidents do play a role in shaping Iran's foreign and domestic policy which often reflects the ebbs and flows of society and they also have the power to appoint key Cabinet members and provincial governors.

"Iran's elections are often viewed in the west as black and white, with the Supreme Leader sitting on top and nothing else matters," said Reza H. Akbari, a program manager at the Washington-based Institute for War and Peace Reporting. "But the political system is far from monolithic, and elections are competitive."

Ayatollah gets final say, not the president

Although the position remains subordinate to supreme leader Ayatollah Ali Khamenei, who carries the final say over Iran's foreign and domestic matters, presidents have negotiated and swayed the supreme leader's decision on a variety of issues. one of the most recent being Iran's 2015 nuclear deal.

What would have been unimaginable during Mahmoud Ahmadinejad's tenure as president, Rouhani was also able to secure a team of experts to negotiate a nuclear deal, that lifted some sanctions and began the process of thawing relations with the west.

Rouhani supports diplomacy with U.S.

Rouhani's emphasis on diplomacy and his pledge to open Iran to the international community, compared to Ahmadinejad's isolationist approach, illustrates the nuances that different actors bring to the role of president and how those differing agendas has far reaching domestic and foreign policy influence.

President's also have tremendous influence over the economy. After inheriting a messy economic mess from Ahmadinejad who mismanaged public funds, Rouhani was able to bring inflation rights from 40 percent down to 7.5 percent in 2016, according to local media in Iran.

Supporters of Iranian President Hassan Rouhani for May 19 presidential election attend a campaign rally in Tehran, Iran, Saturday, May 13, 2017. Iran's President Hassan Rouhani has said that Friday's presidential election will place the country at a critical juncture, and its people must choose between peace or tension. Speaking Saturday to tens of thousands of his supporters at Tehran's Azadi Stadium, his biggest campaign rally thus far, Rouhani said, "We are at the edge of a great historical decision. Our nation will announce if it continues on the path of peacefulness or if it wants to choose tension."

Credit: Ebrahim Noroozi

icon to expand image

Credit: Ebrahim Noroozi

Q: How do elections in Iran work?

A: This is the Islamic Republic's 12th presidential election. The voting age in Iran is 18-years-old and there are about 50 million eligible voters. Presidents can serve up to two consecutive four-year terms. Presidents generally win second terms, experts say, but slow economic growth has fueled criticism against Rouhani and made a much tighter race than anticipated.

"There are people that argue that change is not happening fast enough," Akbari said. "They do not see the impact on sanctions relief that came as a result of the nuclear deal as much as they want to."

The Guardian Council — a 12-member unelected clerical body — is responsible for vetting candidates. Out of 1,600 people who registered to run in this year's presidential elections, the Guardian Council approved six people.

Iran's former President Mahmoud Ahmadinejad, flashes a V sign during a rally organized by Hezbollah in the southern border town of Bint Jbeil, Lebanon, on Thursday, Oct. 14, 2010. Thousands of Hezbollah supporters jammed a stadium in southern Lebanon Thursday ahead of a visit by Iranian President Mahmoud Ahmadinejad that will take him to within a couple miles of the Israeli border — a trip that the U.S. and Israel have called intentionally provocative.

Credit: Hussein Malla

icon to expand image

Credit: Hussein Malla

Former President Ahmadinejad, a divisive conservative figure who served two terms from 2005 to 2013, registered to compete in this year's presidential election, but was disqualified. To win the presidency, a candidate must get more than 50 percent of the vote. If no candidate wins the majority, a run-off between the two lead contenders will take place a week later.

Q: Who are the leading candidates for president? 

A: Hassan Rouhani, 68: He is a centrist leaning candidate who is running for a second term and is considered the front runner. In 2013, he campaigned on the platform of enacting social and domestic reforms, such as providing universal health insurance, supporting an open political atmosphere in universities and engaging with the west. While he did keep his campaign promise of sealing the 2015 nuclear deal, many of Rouhani's 2013 campaign promises on social freedoms have been stalled after he ran up against fierce opposition from hardliners who worry that Rouhani's policies will undermine their power.

Ebrahim Raisi, 56: Although experts say that Raisi doesn't have much political experience, he appears to be the preferred conservative choice among hardliners and has close relations with Iran's supreme leader, Ayatollah Ali Khamenei. In 1988, Raisi was part of a tribunal that oversaw the execution of thousands of political prisoners.

Mohammad Bagher Qalibaf, 55: As the conservative mayor of Tehran, Qalibaf has strong political experience and is considered by experts to be Rouhani's biggest challenge. He is also a former commander of the power Iranian Revolutionary Guard Corps.

Q: What issues matter to Iranians? 

A: Iran's economy has played a huge role in the presidential election. Unemployment and poverty remains a huge problem in Iran's big cities and rural towns. Many feel disheartened, arguing that they have yet to reap the benefits of the 2015 nuclear deal, causing some experts to speculate whether there will be a low voter turnout among Rouhani supporters.

During the televised presidential debates, conservative candidates leveraged those sentiments using populist rhetoric and lashed out at Rouhani for Iran's slow economic growth. Qalibaf and Raisi promised to improve the economy by providing government housing and offering monthly cash payments to the poor.

Q: Will the election affect U.S.-Iran relations? 

A: All six presidential candidates said they will agree to uphold the nuclear deal during the televised presidential debates. But experts are concerned about how a conservative candidate will interact with President Donald Trump.

During the Obama administration, bilateral communication channels were established, helping to deescalate potential crises. But so far, no channels between the Trump administration and Iran exist. This worries Akbari, who said that as tensions between the U.S. and Iran increase, if a conservative candidate were to become president, there is a chance for things to spiral out of hand.

"Trump's rhetoric towards Iran is so harsh that to have someone else on the other side who is equally harsh, it might provoke an unintentional confrontation," Akbari said.