Ibn al-Qayyim (may Allāh have mercy upon him) said in Al-Turuq Al-Ḥakīmah (1/406-408):1
…It is obligatory upon the ruler to prevent the mixing of men and women in the marketplaces, (public) areas and gatherings of men. (Imām) Mālik (may Allāh have mercy upon him and be pleased with him) said: “I hold that it is for the Imām to give priority to scrutinizing the goldsmiths (who are) sitting in the gatherings of women. And I hold that he should not leave the young woman to sit with the goldsmiths. As for the woman of high rank and the man who is a lowly servant, (the woman) having no (reason to have) concern for the gathering and he (the servant) does not care who sits with him, then I do not see a prohibitive problem with that.”
The Imām will be asked about that and the fitnah in it is great. He (ﷺ) said: “I have not left behind a fitnah more harmful upon the men than women.” And in another ḥadīth: “Separate the men and women.” And in another ḥadīth, he said to the women: “You should be on the outer borders of the path.”
It is obligatory upon him (the ruler) to prevent the women from going out beautified and wearing makeup. And he must prevent them from wearing clothing in which they are kāsyāt ʿāriyāt (clothed but naked at the same time); such as clothing that is loose and flimsy. He should prevent them from speaking to men in the streets and he should (likewise) prevent the men from that. And if the ruler sees that it causes corruption to the woman that she, adorns herself with makeup, beautifies herself or her clothing with dye or the likes, then some of the jurists have permitted with regards to that, and they were correct, that he may confine the woman (to her home) if she frequently goes out of her house; and that is the least of the monetary punishments; especially if she goes out wearing makeup. Rather, silent agreement of the women upon that is considered to be aiding in sin and disobedience; and Allāh will question the ruler concerning that. The chief of the believers, ʿUmar Ibn Al-Khaṭṭāb (may Allāh be pleased with him), prevented the women from walking in the pathways of men and mixing with them in the streets. So it is upon the ruler to follow his example in that.
There is no doubt that allowing for the women to mix freely with the men is the origin of every trial and evil; and it is from the greatest reasons for the descending of punishment which is general (encompassing everyone) just as it is from the reasons for corruption of the general and specific affairs. Mixing between men and women is the reason for increase of fawāḥish (lewdness) and fornication; and it is from the reasons for general death and contagious diseases.
Al-Khallāl said in his Al-Jāmiʿ: “Muḥammad Ibn Yaḥyá Al-Kahhaal informed me that he told my father, ʿAbdullāh, ‘I see the evil man with the woman (i.e. I see that it is the evil man who mixes freely with women)’ He said: He has spoken correctly with it (this statement).’ And the Prophet (ﷺ) informed me (thus as is in Ash-Shaamilah) that the woman who perfumes herself and goes out of her house is a fornicatress. And he forbade the woman from attending Salat al-ʿIshāʾa in the Masjid if she has scented herself with incense.”
The Prophet (ﷺ) said: “When the woman goes out the Shayṭān accompanies her.” There is no doubt that allowing for the women to mix freely with the men is the origin of every trial and evil, and it is from the greatest reasons for the descending of punishment which is general (encompassing everyone) just as it is from the reasons for corruption of the general and specific affairs. Mixing between men and women is the reason for the increase of fawāḥish (lewdness) and fornication, and it is from the reasons for general death and contagious diseases. When the prostitutes mixed with the hosts of Mūsá and began to commit acts of faahishah (prostitution) amongst them, Allāh sent the diseases to them so that in one day 70,000 people died. And the story is well known in the books of tafsīr.
So from the greatest reasons for general death is the abundance of al-Zināʾ (fornication) brought about by allowing women to mix freely with men and walk amongst them beautified wearing makeup. If the rulers knew what that contained from corruption of the dunyā and the people under their custody with regards to the religion, then they would be the most stern in the prevention of that.
ʿAbdullāh ibn Masʿūd (may Allāh be pleased with him) said: “When al-Zinā spreads in a village then Allāh permits its destruction.”
Ibn Abīd-Dunyā said: Ibrāhīm Ibn al-Ash’ab told us: ʿAbd al-Raḥmān Ibn Zayd al-‘Amaa told us, on the authority of his father, from Saʿīd ibn Jubayr, from Ibn ʿAbbās who said: Allāh’s Messenger (ﷺ) said: “A people have never shorted (others) in their measurements nor reduced their weights except that Allāh ‘Azza wa Jal has prevented them from expansion. And fornication has not spread amongst a people except that death has spread amongst them (as well). And the act of the people of Lūt has not appeared amongst a people except that ignominy spreads amongst them. And a people have not abandoned commanding the good and forbidding the evil except that their actions are not raised up (to Allāh) and their supplications are not responded to.”2
And may prayers and peace from Allāh be upon his Prophet Muḥammad, his family and companions.