Ever since Saudi Arabia’s execution of Shia dissident Nimr al-Nimr was met with violent protests at the Saudi embassy in Iran, the two already hostile countries have been at diplomatic loggerheads. But while Saudi Arabia’s actions suggest a unity of purpose at the highest level, the Iranian reaction has not been uniform.

The Iranian government has severely criticised the attacks on Saudi Arabia’s diplomatic missions. President Hasan Rouhani attributed the attacks to “rogue elements” who “want to damage the dignity of the Islamic Republic”.

By contrast, the supreme leader, Ayatollah Khamenei, and officials close to his office such as Tehran’s leader of Friday prayers, have tacitly or openly supported the protesters.

The official media, meanwhile, is similarly divided with reformist and pro-government newspapers and websites taking a critical but more measured line while conservative media and those close to the security and intelligence establishments have adopted a more aggressive tone.

These conflicting reactions stem from the deep ambivalence at the core of the Iranian state, which combines centres of power both popular and divine.

That contradiction is reflected in the country’s official name: the ‘Islamic Republic’ of Iran. This means that different and often competing ideological factions are constantly trying to dominate the state and its vast economic resources, and to shape Iran’s strategic direction both internally and externally.

Such rivalries can become particularly intense at critical domestic junctures and produce unintended consequences. The massive 2009 protests after the re-election of Mahmood Ahmadinejad, widely perceived as a fraudulent election, was a glaring example of how the intensified factional strife at the top of the Iranian regime can make it vulnerable to popular radicalism from below.

Iran might soon find itself in a similar situation.

Trouble brewing

Elections for both the parliament and the “assembly of experts” are set for February 2016, and both are highly significant. If reformist candidates can enter into the parliament in large numbers, the Rouhani government will be further empowered to pursue its cautions but strategic rapprochement with the west.

Iranian conservatives fiercely oppose this. In fact, ever since the start of the nuclear negotiations with the US, Ayatollah Khamenei and his supporters have covertly and sometimes publicly tried to prevent the use of what he at the time described as “heroic flexibility” as a licence for normalising relations with the US.

Consequently, the Rouhani government has been under constant fire from the conservative groups close to Khamenei for its “deviation” from the revolution’s anti-American path and making too many concessions to the West as part of the deal. For example, they severely criticised Iran’s foreign minister Javad Zarif for having had one-to-one meetings with his American counterpart John Kerry and demanded that sanctions be lifted immediately, rather than on condition of Iran’s compliance with the deal.

With reports suggesting the deterioration of Ayatollah Khamenei’s health, the elections for the assembly of experts, which selects the future leader, have also assumed unusual importance.

This is the complicated context behind the array of Iran’s divergent reactions to the Saudi-Iranian diplomatic crisis.

Mixed messages

Conservative factions seek to use Saudi Arabia’s provocation as a pretext to undermine Rouhani’s government and its pragmatic foreign policy as part of their broader campaign ahead of the elections. “We’ll turn America into an Islamic Republic,” read one of the placards in a recent demonstration in Tehran protesting Saudi Arabia’s execution of al-Nimr.

However, what is striking about the current reformist-conservative clash is that some prominent figures closely associated with the supreme leader have also criticised the attacks on Saudi Arabia’s diplomatic missions.

For example, while the Islamic Revolutionary Guard Corps (IRGC) issued a harshly worded statement threatening Saudi Arabia with retaliation for Nimr’s execution, the commander of the IRGC’s Tehran unit, Mohsen Kazemeini, described the attack on the Saudi embassy as “very wrong”, and rejected the claim that it was a “spontaneous move by the people”.

Mostafa Pourmohammadi, Iran’s justice minister, whose appointment by the president unofficially requires the approval of the supreme leader, has also said that the attack could have been “planned and supported by infiltrator elements”.

Meanwhile, the head of the police – also appointed by the supreme leader – responded to criticisms of its forces’ inability to prevent the protesters from attacking and entering the Saudi embassy by saying that “sometimes we can’t beat the people”. This sparked uproar on social media, where users mocked him by posting pictures of police brutality during the 2009 protests.

The apparent difference of opinion within the conservative forces, the IRGC in particular, might reflect a real concern about the spread of sectarian conflict into Iran. After all, the country has a sizeable Sunni population, with plenty of grievances against state repression and discrimination. Or it might be that Rouhani and his still-influential ally, former president Akbar Hashemi Rafsanjani, have managed to attract some prominent members of the IRGC and conservative factions into their camp.

At any rate, the fallout from this still-escalating crisis proves that Iran’s political forces are still anything but reconciled – and it may turn out to be a bad omen indeed.