The upcoming presidential election in May 2017 will determine not only Iran's policies in the short term but also the future direction of the Islamic Republic. Based on the result of this election, Iran can move towards either a more theocratic, militaristic regime or a more democratic, electoral one.

Many of Iran's observers have analysed elections through the binary lens of moderates v hardliners. From this viewpoint, the primary candidates who can pass the filter of the Guardian Council, a conservative institution responsible for endorsing the final candidate list, belong to two groups: hardliners and moderates.

Right now, three main candidates are running: incumbent President Hojatoleslam Hassan Rouhani from the moderate wing; and Hojatoleslam Ebrahim Raisi and Mohammad Ghalibaf, both hardliners.

Raisi is the national prosecutor-general and the custodian of the Imam Reza shrine in Mashhad, while Ghalibaf is the former commander of the Islamic Revolutionary Guard Corps (IRGC) and Iran's national police, and current Mayor of Tehran.

However, the binary of moderates and hardliners is no longer a useful paradigm with which to understand Iranian politics. It cannot explain the difference among hardliner candidates; nor can it predict Iran's political future.

To better understand Iran's politics, it helps to examine which power bloc each candidate belonged to before running for office: the clergy, the technocrats, or the military/security forces.

Three blocks that shaped Iran

Since 1979, these three blocs and the interactions between them have shaped Iranian policy. Three forms of alliances have arisen from the interactions between these groups: the clergy-military, the clergy-technocrats and the military-technocrats.

In the 1980s, the clergy-military alliance was the dominant axis, and the clergy had the upper hand therein. In the 1990s, power shifted in favour of the technocrats and against the Revolutionary Guard.

During the Hashemi Rafsanjani period (1989–1997), the clergy-technocrats alliance was dominant, and the clerics had more weight. However, during Khatami's presidency (1997-2005), this alliance changed to a technocrat-clergy alliance in which the bureaucrats had the upper hand.

The power shifted again under Ahmadinejad as the IRGC-bureaucrats alliance became the most influential group and political base of his hardliner administration (2005-2012). Currently, under Rouhani's presidency, technocrats have returned to power and are responsible for shaping government policy, while the IRGC has become marginalised, at least in the administration.

Using this framework, we can categorise the main presidential candidates in three categories: some are close to the clerical network (Howzeh), while others are close to the bureaucracy or military. For example, Hassan Rouhani represents the clergy-technocrat alliance; Raisi, the clergy-military/security alliance; and Ghalibaf - the security/military-technocrats alliance.

Iran's Supreme Leader Ayatollah Khamenei, is also closer to the alliance of the clergy and the military (IRGC). This explains his appointment of Raisi as the custodian of the Imam Reza shrine, the wealthiest conglomerate foundation in Mashhad. Raisi also has a good relationship with the IRGC and the Basij militia, as well as the Iranian judiciary.

READ MORE: Mahmoud Ahmadinejad 'disqualified' from Iran elections

These three axes - the clergy-military, the clergy-technocrat, and the technocrat-military - have different political, social, cultural and even economic orientations. As a result, the victory of one of these candidates in the May presidential election will decide which group holds the most power in shaping Iran's domestic and foreign policies. Not only that, this most powerful axis will affect the future of the Islamic Republic by influencing future elections and, most importantly, the appointment of the next supreme leader.

It seems that this is the most important election in the history of the Islamic Republic so far.

Second most powerful figure

While Iran's presidents lack the ultimate power to design Iran's security and foreign policies, which falls under the domain of Iran's supreme leader, the president is still the second most powerful figure in Iran's political structure.

The re-election of President Rouhani would lead to continued normalisation and rationalisation of the regime and a strengthening of the technocrats. Meanwhile, the victory of Raisi might instead strengthen the axis of radical clergy and the Revolutionary Guard and lead to the radicalisation of the administration and narrowing down of the political space. Similarly, Ghalibaf's victory would strengthen the security/military-technocrat alliance and probably increase the involvement of the IRGC in politics.

The election is significant in determining short-term policies, but it also has a substantial impact on the selection of the next supreme leader. Although the president is not directly involved in the selection process, the president still plays an important role. The Iranian constitution states that, in the event of the death of the Supreme Leader, the president is one of three key figures in a council that will take over the duties of the supreme leader until the Assembly of Experts, a body of 88 jurists, appoints a new one.

OPINION: Ten things Iranians can do to preempt a Trump war

The other two members of this council are the head of the judicial power and a jurist from the Guardian Council. Because there are no constraints on the length of the appointment process, the temporary ruling council could be in power for a long time.

Among the presidential candidates, both Rouhani and Raisi are members of the Assembly of Experts. As a result, they have more power in the selection of the next supreme leader when the time comes. Because Ayatollah Khamenei is 77 and has been reported not to be in good health, there is a possibility that the next supreme leader will be elected within the next four years.

The leaders who are affiliated with the clergy-military alliance can move Iran in a different direction, possibly towards a more militaristic regime, than leaders who are closer to the clergy-technocrats axis. For this reason, it seems that this is the most important election in the history of the Islamic Republic so far.

Saeid Golkar is a lecturer at the Middle East and North African Studies Programme at Northwestern University, and senior fellow of Iran policy at The Chicago Council on Global Affairs.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.