The Supreme Leader Ayatollah Khamenei holds many of the cards and, as an unelected individual, can claim the greatest share of power. He directs foreign policy and has a degree of economic control too.
Iran's president is the country's highest official after the supreme leader and is responsible "for implementing the Constitution and acting as the head of the executive, except in matters directly concerned with (the office of) the Leadership."
The president has a lot of sway over economic issues but not full control, said Khalaji.
Khamenei has sought to present himself as a religious figure who is above politics, said Vatanka, but his actions have betrayed his agenda. "He tends to opt for policies which are conservative and almost always about protecting his power," he said.
Iran has an elected parliament, but it does not play a significant role in deciding strategic issues such as foreign policy, said Vatanka, although it does pass a budget.
The Guardian Council again plays a role in approving parliamentary candidates, and lawmakers have seemed keen to support the supreme leader since he and Ahmadinejad fell out, he added.
"There has been a power grab over the past few years by Khamenei, and that has come at the expense not only of the president but of Parliament," Vatanka said.
What happened in 2009?
Ahmadinejad, who had Khamenei's backing, found himself in an unexpectedly close and polarized race with reformist candidates, including Mir Hossein Moussavi. People were so excited they rallied in the streets across the country, and the voting seemed set to go to a second round, Khalaji said.
However, Ahmadinejad won re-election with 62.63% of the vote, according to Iranian government sources. His nearest rival, Moussavi, received 33.75%. Demonstrations protesting the outcome of the election broke out across Tehran. Dozens of people were reported killed. Despite widespread unrest, Ahmadinejad's re-election was formally certified by the Guardian Council.
The Green Movement, the opposition force that exploded onto the scene during the 2009 elections, was later crushed by the regime's security apparatus. Moussavi and another opposition leader, Mehdi Karoubi, remain under house arrest.
Dozens of political activists are still in prison, and others who were released live under restrictions, Khalaji said.
Iran's security officials have warned the public against anti-government street protests this time round.
No independent investigation was allowed, said Vatanka, and the extent of the fraud that took place in 2009 remains unknown.
How is this election expected to differ from others?
The Supreme Leader learns from past mistakes, but Iran is a big country and its politics are unpredictable, said Khalaji. Polls he has seen predict just over half the country's voters will cast their ballot, which would be the lowest turnout since the Islamic Republic of Iran was established in 1979.
The outcome depends in part on whether the middle class comes out to vote in big numbers, Khalaji said.
However, the people who vote are are mostly organized by the government -- some 15 million of them, said Khalaji. The organization is done through the religious network of mosques and the loyalist Basij militia, particularly in small towns and rural areas, he said. Municipal elections will also be held Friday, which could also bring people to the ballot box.
The presidential election could well go to a second round this time, said Khalaji.
There is no sign of the same excitement that galvanized the Iranian people before the 2009 election, said Vatanka, but there have not been wide calls for a boycott either. Although Rouhani is not beloved by the reformist camp, they may rally behind him as their best option rather than see the hardliners' preferred candidate elected by a big margin, he said.
"Iranian public opinion is deafeningly silent, a silence that even the media close to the regime has complained about," Ali Reza Eshraghi, Iran's Project Manager at the Institute for War and Peace Reporting, said in a commentary for CNN.com.
"Unlike the four previous presidential elections during which the streets were turned into lively and colorful carnivals with the supporters of different candidates engaging in unending debates and fervent speeches, this time it is only the walls of the streets that have been covered with banners and posters."
How will the election outcome affect Iran's international relations?
Foreign policy is designed and implemented by the Supreme Leader, not the president, said Khalaji. As a result, the change of president will do little to influence foreign policy directly.
Eight or 16 years ago this wouldn't have been the case, said Khalaji, but the old elites and factions have been largely sidelined, and a new generation of politicians totally loyal to Khamenei has taken their place.