The 40th anniversary of Iran’s Islamic revolution in February 1979 was greeted by an extraordinary tweet from US president Donald Trump. In both English and Arabic, it referred to “40 years of failure” and said the Iranian people deserved a “much brighter future”.

The reaction from Iran’s regional competitor Saudi Arabia was along much the same lines. As Iran celebrated the anniversary of the February 11 revolution, Prince Turki Al-Faisal said the country: “is turning its people into paupers instead of providing them with health services, with food and with things people look forward to”.

A tweet from Trump’s national security adviser John Bolton was blunter:

For all your boasts, for all your threats to the life of the American President, you are responsible for terrorizing your own people. I don’t think you’ll have many more anniversaries to enjoy.

In spite of such comments – and growing economic frustration in Iran – the 40th anniversary of the Islamic Republic is one that few envisaged in the early years of the state.

On February 1 1979, an Air France plane arriving from Paris touched down in Tehran. On board was a figure who would dramatically alter Iranian politics. Carefully helped down the steps from the plane, Grand Ayatollah Ruhollah Khomeini was welcomed by a throng of photographers, supporters and cameramen before being swiftly ushered into a waiting blue Mercedes Benz.

Across Tehran, more than a million people demonstrated against the rule of the Shah, Mohammad Reza Pahlavi, and in support of Khomeini. After years in exile, the returning Khomeini would have a dramatic impact on revolutionary life across Iran. Just ten days later the Regency Council – appointed to run Iran after the Shah went into exile amid increasing protests – fled, eventually seeking exile in France.

After Khomeini’s return and a national referendum, the Islamic Republic was declared on April 1. A year later, war broke out. Iraqi forces attacked their Iranian counterparts, demonstrating the level of concern that revolutionary action had provoked. The establishment of the Islamic Republic had a dramatic impact on regional security. This was not only as a consequence of the redrawing of old alliances and the struggle to assert and reassert influence across an increasingly unstable environment. It also stemmed from the creation of an Islamic Republic that was predicated on a set of Shia beliefs – despite Khomeini’s efforts to stress its pan-Islamic appeal.

Few states witnessed events in Iran with more trepidation than the Kingdom of Saudi Arabia. The kingdom had predicated its legitimacy and very survival upon claims to Islamic leadership – yet the establishment of an explicitly Islamic republic was seen to erode this legitimacy. It prompted the Al Saud regime to embark on a process of framing events in a sectarian manner, positioning the Islamic Republic as a Shia project and thus reducing its appeal to Sunnis.

Of course, we should not view 1979 as the event that triggered sectarian tensions. Instead, 1979 was the latest incident in a long history of tensions between different sects within Islam that are shaped by contextual factors, political agendas and regional aspirations. Yet in states with societies divided along sectarian lines, the revolution had a dramatic impact on the relationship between rulers and ruled. In Bahrain, Iraq, Lebanon, and Saudi Arabia, the revolution inspired Shia groups who had long experienced marginalisation at the hands of political elites wishing to retain power.

In the decade after the establishment of the Islamic Republic, the elite wing of the Revolutionary Guards Corps – the Quds Force – helped establish Shia groups across the region, most notably Hezbollah in Lebanon, and helped the Islamic Front for the Liberation of Bahrain plan a coup d’etat which was ultimately unsuccessful. The desire to provide support to Shia groups – and those oppressed across the Islamic world – was enshrined in Article 3.16 of the Iranian Constitution, which ultimately helped construct nefarious perceptions of the regime in Tehran perhaps best seen in the idea of a “Shia Crescent” doing the bidding of Iran.

With the end of the Iran-Iraq war and the death of Khomeini, relations between Iran and Saudi Arabia began to thaw, entering a period of burgeoning rapprochement – yet, with the 2003 US-led invasion of Iraq, changing geopolitical dynamics put an end to this rapprochement. In such a climate, states with divided sectarian societies once again became sites of competition for political and economic influence, most notably in Iraq and Lebanon.

Violence begat violence, often taking place between sects within political projects. As tensions between Riyadh and Tehran worsened, these sites of competition took on increasing political importance, leading to the cultivation of a range of networks – often yet not exclusively along sectarian lines –- in an attempt to exert influence.

The onset of the Arab Spring exacerbated these tensions, creating opportunities for Tehran and Riyadh to both increase their influence which was often seen in zero-sum terms: a win for one was a loss for the other and vice versa. The uprisings began as an expression of anger at political, social and economic conditions across the region, yet – much like the aftermath of the revolution in Iran – regimes created sectarian master narratives as a means of ensuring their own survival in a process that political scientists Nader Hashemi and Danny Postel have termed “sectarianization”.

Across the region, domestic unrest took on increasingly sectarian characteristics. In Bahrain, Syria and Yemen, this sectarian difference became violent, located within broader geopolitical rivalries, with devastating consequences, most notably in Yemen.

Four decades after the revolution, Iran continues to wield a great deal of influence across the Middle East, yet the continued survival of the Islamic Republic also serves as a source of consternation. The regime in Tehran is seen as a pernicious presence behind any unrest in Shia communities across the region. This, in turn, shapes regime policies – not just towards Iran, but also their own Shia populations which continue to face widespread discrimination in a number of cases.

The resonance of the Shia Crescent narrative is testament of the legacy of revolutionary activity across Iran, revealing not only the fears of rulers in the Middle East, but also in the western world.

This article was originally published on The Conversation