The Islamic Republic of Iran is the platypus of humanity's political evolution.

Episodic Iranian unrest, from the focused, reformist uprising of 2009 (led by middle-class protesters of Tehran) to the current, wildly rejectionist riots (spearheaded by the underclass and the unemployed in the poor neighborhoods of provincial towns) cannot be understood in isolation from that melange of procedural democracy and obscurantist theocracy that was crammed into the constitution of revolutionary Iran, four decades ago.

Deep within Iran's authoritarian system there is a tiny democratic heart, complete with elective, presidential and parliamentary chambers, desperately beating against an unyielding, theocratic exoskeleton. That palpitating democratic heart has prolonged the life of the system - despite massive mismanagement of the domestic and international affairs by the revolutionary elites.

But it has failed to soften the authoritarian carapace. The reform movement has failed in its mission because the constitution grants three quarters of the political power to the office of the "Supreme Leader": an unelected, permanent appointment whereby a "religious jurist" gains enormous powers, including command of the armed forces and foreign policy, veto power over presidential cabinets and parliamentary initiatives, and the world's most formidable Pretorian Guard (IRGC), with military, paramilitary, intelligence, judicial and extrajudicial powers to enforce the will of its master.

The democratically-elected president and parliament (let alone the media and ordinary citizens) have no prayer of checking the powers of the Supreme Leader. As a result, the system has remained opaque, blind to its own flaws, resistant to growth and incapable of adaptation to its evolving internal and external environments.

Unlike the present riots, the 2009 movement had a well-defined political vision and a seasoned leadership which was quickly arrested, prosecuted and imprisoned.

These uprisings express the frustration of the people with that obdurate rigidity.

It took a decade after the revolution of 1978-1979 for the democracy movement to gain self-consciousness, in the mind of a segment of the cadre elite of the revolution, at the disappointing end of the Iran-Iraq war in 1988.

It took another decade for this sentiment to gestate before it took political shape in the wave that carried President Mohammed Khatami to power in 1997. The empowered reformists aimed to strengthen the democratic component of the Republic while softening its theocratic and authoritarian casing.

They failed in this mission because the ruling theocrats would not brook the slightest diminishment of their power. They fought Khatami tooth and nail and sabotaged his plans. They created, in the words of the first reformist president, a "crisis every nine days" to break him.

The failure of the reformers resulted in a popular malaise. As hopes of reforming the Islamic Republic were frustrated, many stayed away from the polls in 2005 elections. This allowed the rise of a neo-conservative counter elite headed by the firebrand, Mahmoud Ahmadinejad.

The ensuing international isolation and precipitous devaluation of the currency sobered the people enough to send them back to the polls in 2009, to depose the dangerous lunatic who had climbed to the office of presidency. When Ahmadinejad was declared the winner, the perception of a stolen election led to immense street demonstrations that came to be known as the Green Uprising.

Unlike the present riots, the 2009 movement had a well-defined political vision and a seasoned leadership which was quickly arrested, prosecuted and imprisoned. Street demonstrations were brutally suppressed.

Ahmadinejad's second term was even more disastrous than his first. The near economic collapse under the UN-imposed sanctions, and rampant profiteering due to the ubiquitous black market in everything from cancer drugs to selling oil in international markets, persuaded people to once again return to the polls.

In the 2013 elections, people elected Hassan Rouhani, a moderate cleric who promised international normalisation and economic prosperity, but not hardcore reform or liberalisation. The reformers extended an olive branch to the autocratic right-wing establishment to let the bygones of 2009 be bygones.

But the Supreme Leader arrogantly rejected the gesture. Far from being ashamed of what they had done, the ruling theocrats had decided to transform the suppression of the Green Uprising into a foundational myth for their neo-fundamentalist cult. Not even the emerging regional threats by a new Arab/Israeli alliance and the election of a blatantly anti-Iran president in the United States persuaded the right wing to put aside their "anti-reformist" sentiments.

In his first term, Rouhani managed to check the hyperinflation and the runaway unemployment while concluding a historic agreement with Iran's iconic adversary, the US. But his second term did not start auspiciously.

First, Rouhani appeared to buckle under right-wing pressures when he appointed a relatively conservative cabinet: A disappointing pattern people had already seen in President Khatami's second term. To make matters worse, the Americans under Trump (or, as he is known in Iran, the American Ahmadinejad) started to renege on the promises of the nuclear deal. Hopes for a quick recovery had now been dashed.

Further fuel was added to the volatile mix as a series of mammoth corruption schemes came to the light. Then, under pressure from the right wing, President Rouhani decided to justify raising taxes on gasoline by revealing the massive, entitlement budget for religious foundations that was imposed on him by powers that be. It is hard to overestimate the anger this profligacy inspired in people.

The straw that broke the proverbial camel's back was a mere rise in the price of eggs. The right-wing powerful duo of the city of Mashad, Ebrahim Raisi (the embittered rival of Rouhani in the recent elections) and his famously simple-minded father-in-law, Ahmad Alamolhoda, struck the first match by staging a small anti-Rouhani demonstration, blaming the high price of consumer goods on the Rouhani government.

This was the proximate cause of the current unrest, which must be seen only as a trigger, rather than its driving force. The sudden spread of these riots has led to the speculation that they are instigated by extraterritorial enemies such as the Saudi-Israeli-US alliance. But, as there is nothing new about that sort of anti-regime agitation, it is unlikely that they were causally significant.

As long as Iran does not radically modify its institution of the office of the Supreme Leader, and as long as the democratic element of that system remains marginalised and powerless to express the wishes of the people and reduce tensions through legal representation, riots and uprisings will be an immanent and permanent feature of the Islamic Republic of Iran.

Maybe, under a benevolent despot, all these powers would be put to effective use. But Iran and its neighbours on all sides are no exception to British historian Lord Acton's rule: "Power tends to corrupt, and absolute power corrupts absolutely. Great men are almost always bad men."

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