On 10 February, Israel announced that an Iranian drone had been shot down in western Syria. Later, an Israeli F-16 crashed after being hit by Syrian anti-aircraft fire over the north of Israel. Both Iran and Israel claimed provocation by the other. Whatever the truth of the matter (the drone allegation was not fully convincing), it is clear that after nearly seven years of war in Syria, Shia Iran’s presence in that blighted country is stronger than ever. In fact, what we mean when we speak of Iran in Syria is the presence of the Iranian Revolutionary Guard Corps, the influence of which has grown over the last ten years. Where did the Revolutionary Guards come from? How powerful are they, and does their greater influence signify an expansionist Iran and even more trouble in the Middle East?

When Ayatollah Khomeini returned to Iran from exile on 1 February 1979, he was greeted by an enormous crowd (estimates of its size have run up to three million, but no one really knows). For ten days or so after Khomeini’s return, the country had two prime ministers: Mehdi Bazargan, a liberal non-cleric appointed by Khomeini; and Shapur Bakhtiar, appointed by the Shah, Mohammad Reza Pahlavi, in the last days before he left Iran in mid-January.

The situation in Tehran and across large parts of the country was chaotic. The police were scarcely to be seen, and some of their responsibilities, such as traffic control, were taken on by armed revolutionaries – students and others who had taken weapons from ransacked police stations and military bases. Some of those armed paramilitaries were associated with revolutionary committees called Komiteh, rather like the Soviets in Russia in 1917-21.

The Komiteh were mostly based in mosques, from which they distributed food and fuel oil for heating and cooking (normal retail distribution had largely broken down). Other armed groups were connected with political movements – leftists, and the Mojahedin-e Khalq organisation (MKO), a Marxist-Islamic outfit that had carried out terrorist attacks against the Shah’s regime (and some US nationals) over the previous decade. These movements had been persecuted almost to annihilation by the Shah’s secret police, but had expanded again as the revolution gathered pace.

The final showdown came between 10-12 February 1979. Some air force technicians who had previously declared for Khomeini were confronted by members of the old Imperial Guard at the Doshan Tappeh base in the east of Tehran. Exchanges of slogans and abuse were followed by exchanges of gunfire. Crowds and armed paramilitaries converged on the area and some joined in the fighting (including MKO members).

The military, still loyal to Bakhtiar, sent armoured columns through the city to restore order and relieve the pro-Shah troops, but crowds surrounded the tanks and stopped them getting through. Finally, on the morning of 12 February, the military commanders met, acknowledged the hopelessness of the situation, announced on the radio their (so-called) neutrality and ordered all troops to return to their barracks. Bakhtiar gave up in disgust and went into hiding, leaving the country a few weeks later.

Khomeini’s supremacy was complete. But there was still a dangerous vacuum of authority in the country, which persisted for several months in 1979. It was this chaotic situation that led to the formation of the Revolutionary Guards – or to give them their full title, the Guards Corps of the Islamic Revolution (Sepah-e Pasdaran-e Enqelab-e Eslami). They are usually referred to as the Sepah by Iranians. Khomeini’s overwhelming popularity as leader of the revolution was undisputed, but a variety of groups were hoping to take advantage of his supposed naivety, advanced age and political ignorance to win control for themselves – by violence if necessary.

In April 1979, one of Khomeini’s closest followers, Morteza Motahhari, was assassinated by an obscure extremist group, the Forqan. In previous periods of political crisis in the 20th century and earlier, many Iranians had turned to the clergy for leadership. But the clergy, as a class, had often been uncertain about what to do with the leadership they had been given. Traditionally, most of them disdained and avoided politics. At different stages, the more politically-minded clerics allied themselves with secular liberals or with reaction and the monarchy.

In the first Iranian revolution of the 20th century, 1906-11, one leading cleric, Fazlollah Nuri, was executed by resurgent revolutionaries after he sided with the monarchy in a coup. In 1953, the defection from the coalition behind prime minister Mohammad Mosaddeq of another cleric, Ayatollah Kashani, weakened Mosaddeq and prepared the way for a British- and US-planned coup. The first coup attempt failed but led eventually, after a confused period, to Mosaddeq’s fall from power and the restoration, until 1979, of the rule of the Shah in more autocratic form.

Familiar with this history, Khomeini was determined that, having achieved success in the 1979 revolution, the clergy would not again be pushed aside or exploited by more secularised, leftist or pro-Western elements in the country. He understood the essentials of power in Iran and was determined ruthlessly to stay in control. It was important for him to demonstrate full popular support for the revolution (a referendum held at the end of March 1979 showed 98.2 per cent in favour of an Islamic republic), and to institute a new, Islamic constitution.

But it was necessary also to establish an armed force that was unquestioningly loyal to Khomeini and to the principle of an Islamic republic. Hence the establishment of the Sepah in May 1979. There were other pro-Khomeini paramilitary groups that sometimes carried firearms, notably Hezbollah (the so-called party of God) and the Mojahedin of the Islamic Revolution, but almost from the start, the Sepah was pre-eminent and more disciplined.

The revolution had side-effects well beyond the jockeying for power that went on in Tehran throughout the rest of 1979. Komiteh formed throughout the country as the central authority of the Shah collapsed – including in areas inhabited by ethnic minorities. In several cases, some among these minority groups saw the revolution and its rhetoric of liberation for the downtrodden as an invitation to fairer treatment, and the greater autonomy that they had failed to achieve under the Shah.

The Arabs of Khuzestan and the Kurds of the north-western provinces were two such ethnic groups, as were Baluchis in the south-east and Turkmen in the north-east. The Kurds and Arabs were wooed for a time by politicians from Tehran, but when discussions broke down there were renewed demonstrations, which were suppressed with force. In Khuzestan the disturbances died down fairly quickly, but in Iranian Kurdestan there was an armed insurrection by militant Kurds.

The conflict with the Kurds was carried out by the Sepah and some army units. It was often brutal, with many deaths. Villages were destroyed and many activists and others were arrested and thrown in prison. But the fight was also exploited by Khomeini to maintain an atmosphere of tension, danger and threat in Tehran, to help with his task of consolidating his hold and that of his supporters on the Islamic Republic.

Fighting the Kurdish revolt was an important factor in debates over the new constitution in the summer and early autumn of 1979. The conflict continued into 1980 and beyond, but Khomeini succeeded in securing a new, strongly Islamic constitution at the turn of the year – assisted by the US embassy hostage crisis, which he used to divide leftist and liberal opposition. The war in Kurdestan established the Sepah as the prime defenders of the Islamic Republic, given continuing doubts about the loyalty of the regular armed forces (in July 1980 some air force and army officers attempted a coup, centred on the Nozheh air base in western Iran; Sepah troops broke it up).