On September 15, the Haripur district education officer issued a notification directing school principals to ensure that female students in their respective educational establishments don an abaya. Such instructions continue to be issued, even though on several occasions the involved educational institutions have been forced to withdraw these directives after facing severe criticism on social media.

Dress codes for female students in most Pakistani educational institutions are already sufficiently modest. Yet, there have been cases in which women students have been asked to enhance their modesty with articles of clothing that are thought to be even more morally correct – as if the salwar kameez and dupatta were not good enough.

The reason why such moves now attract more debate and even annoyance is because they have become anachronisms. They seem out of place. Indeed, they found more traction back in the 1980s, but the forces that encouraged such enforced morality in Pakistan are now in the process of rolling back their previous ideas of morality. Therefore, such instructions and acts whenever they crop up now, look like relics of a different time.

Let me explain. Morality projects navigated by the state and certain political and social groups in Pakistan were largely influenced by two Muslim-majority countries: Saudi Arabia and Iran. In October 2017, Saudi crown prince, Mohammad bin Salman, who has been spearheading an unprecedented campaign of social reform in the kingdom, told the UK newspaper The Guardian that the Saudi monarchy introduced “rigid doctrines” and laws in Saudi Arabia due to the fall-out of the Islamic Revolution in Iran of 1979.

It is true that Saudi Arabia was not a bastion of liberalism before 1979, but Prince Salman is correct in pointing out that the country had followed a more moderate strand of Islam before the Iranian Revolution. So, today, when the Saudi regime is allowing women to drive cars, is reopening cinemas, and gradually tolerating the presence of women without abayas in public, it is simply reverting to what was tolerated in the kingdom before 1979.

The Iranian Revolution alone was not the only reason why Saudi Arabia suddenly slapped numerous bans in this respect. King Faisal Abdulaziz, who ruled the oil-rich kingdom between 1964 and 1975, initiated many social reforms, mainly in response to the manner in which the secular Arab nationalist Gamal Abdel Nasser of Egypt had taunted Saudi Arabia of being backwards. Nasser, at the time, was one of the most popular leaders in the Muslim world.

In her 2005 book on Saudi Arabia, Professor Sherifa Zuhur writes that in a bid to overtake Nasser’s Egypt in this context, Faisal rang a series of social reforms in Saudi Arabia which included the introduction of television and the construction of cinemas. He also encouraged the entry of women in workplaces and also ordered the construction of an opera house. Women were not required to wear the abaya and special areas were designated for foreigners to enjoy their alcohol.

However, parallel to this, Faisal also patronised members of the conservative Muslim Brotherhood who had been expelled by Nasser from Egypt. Faisal was assassinated in 1975. But despite the fact that his reforms had drawn criticism from the kingdom’s religious establishment, Faisal’s successor, King Khaled, continued the reforms.

The Middle East expert Dilip Hiro, in his 2018 book Cold War in the Islamic World, writes that both Faisal and Khaled ignored the growing influence of the Sahwa movement which had opposed Faisal’s reforms.

The Muslim Brotherhood members living in exile in Saudi Arabia radicalised this movement. In 1979, inspired by the rhetoric of the movement and also by the criticism of the religious establishment, a group of Saudi militants captured the Grand Mosque in Makkah. Hundreds were killed in the commotion. And this happened just months after a radical Islamic regime established itself in Iran.

Hiro writes that, even though the leaders of the group were executed, the Saudi religious establishment lamented that the group’s concerns were justified because the monarchy had “moved away from real Islam”. This, coupled with similar criticism aimed at the Saudi monarchy by Iran’s newly formed Islamic government, suddenly saw the kingdom rapidly roll back the reforms.

According to Hiro, thus began a race between Iran and Saudi Arabia in which both tried to outdo each other and prove they were more Islamic than the other. Iran banned various activities in the country that it deemed un-Islamic. It also introduced a mandatory dress code for women. A religious police force was formed whose job it was to enforce the dress code and prevent the public mingling of unrelated men and women.

Saudi Arabia responded by closing down cinemas, increasing religious programming on TV, banning music and entertainment outlets, and greatly reducing the number of women on TV, radio and places of work. Women were required to wear abayas in public, and no mingling of the sexes was allowed. Husband and wives were asked to carry their marriage certificates to prove they were married. A special force, the Mutawa, was formed to impose these rules.

Interestingly, it was also in 1979 that so-called Islamic laws were introduced in earnest in Pakistan. The General Zia dictatorship came to power in 1977, but it took two years to introduce the country’s first major set of religious laws.

Happenings in Iran and Saudi Arabia in 1979 clearly encouraged the Zia regime to take this step. The fact that Pakistan eventually became a battlefield of proxy wars between Iran and Saudi Arabia also contributed, with the Zia regime trying to make Pakistan equally Islamic in this strange new race.

Zia did manage to introduce certain unprecedented laws, in the name of Islam, but when he tried to replicate ideas such as introducing dress codes and forming a moral police force, the cultural conditions in Pakistan were not suited for these and they failed to take root.

In his book Social and Cultural Transformations in a Muslim Nation, MA Qadeer writes that what began in Pakistan as a state-backed morality project from above was eventually adopted by various social groups below. These groups began to conduct moral policing by making use of certain laws introduced through ordinances by the Zia regime.

That’s why, even decades after Zia’s demise and the revival of reform in Saudi Arabia, one still sees certain segments in Pakistan decreeing instructions based on their ideas of morality.

Such decrees now do not have direct state or government backing. Yet, they still manage to create some awkward problems because the laws that these decrees base their justification on are still present, like the elephant in the room.

This article was first published in Dawn.