While India's attention is focused on the general elections in Pakistan this month, the unfolding contest for the next president of Iran amidst deep divisions with the country's political elite should be of interest to Delhi.

In the last election four years ago, the reformists objected to the re-election of President Mahmoud Ahmadinejad by alleging that the polls were rigged. Iran's supreme leader, Ayatollah Khamenei, declared Ahmadinejad as the legitimate winner and ordered a massive crackdown on the opposition.

It is now the turn of Ahmadinejad, who can't contest for a third successive term, to be at odds with Khamenei. For more than two years, Ahmadinejad has sought to assert himself against Khamenei and the clerics.

In Iran, it is not the elected president who is the top gun of the nation's political establishment. Under the clerical system in Iran, it is Khamenei who has the ultimate authority on all levers of power. But President Ahmadinejad is not leaving without one big fight.

Ahmadinejad is supporting the candidature of Afsandyar Rahim Mashaei, whose daughter is married to the President's son. Mashaei has been a close adviser to Ahmadinejad but is reviled by religious conservatives who accuse him of deviating from Iran's Islamist ideology and “bewitching” the President.

The big question is whether Iran's leadership will allow Mashaei to run for President if he declares his candidacy. In Iran, the establishment carefully vets the candidates before it lets them run.

This week, Iran's Guardian Council, which has the authority to interpret the Islamic Republic's Constitution, will decide who will run for the Presidential polls after the potential candidates announce themselves. The polling is in June.

The betting is that Mashaei will be disqualified from the contest. Others argue that even if he is allowed, Mashaei has little chance of winning. But Ahmadinejad has been traveling around the country in the last few weeks mobilizing support for Mashaei.

But Mashaei, an electrical engineer by training, has long cultivated the image of an “outsider” in the system and has been bold enough to openly challenge the ideology of clerical rule in Iran.

Ahmadinejad has been hinting for a while he has incontrovertible evidence of corruption in the clerical establishment including members of the powerful Guardian Council. His threat seems fairly simple: if Mashaei is not allowed to run, he would try and bring the house down.

Through his travels in the country, Ahmadinejad has been calling for a “fair election.” Coming from someone who has been accused of fraudulent win last time that might seem much. But politics in Iran, as elsewhere, is about contradictions.

It has been the widespread assumption that the challenge for the current regime in Tehran will come from democrats and reformers. But the threat from Ahmadinejad and Mashaei comes from within the existing establishment.

The empirical record shows that few presidents have successfully challenged Khamenei. The question this week how Khamenei will choose between the risk of letting Mashaei run or that of denying him the opportunity.

This article originally appeared in the Indian Express.