Islam discourages social interaction between men and women when they are alone but not all interaction between men and women.
Namus is an ethical category, a virtue, in Middle Eastern Muslim patriarchal character. It is a strongly gender-specific category of relations within a family described in terms of honor, attention, respect/respectability, and modesty. The term is often translated as "honor".
The Qur'anic verses which address the interaction of men and women in the social context include:
- "Tell the believing men to lower their gaze and to be mindful of their chastity: this will be most conducive to their purity - (and,) verily, God is aware of all that they do. And tell the believing women to lower their gaze and to be mindful of their chastity, and not to display their charms beyond what may be apparent thereof; hence let them draw their head-coverings over their bosoms.(24:30-31)"
- "O Prophet! Tell thy wives and thy daughters, as well as all believing women, that they should draw over themselves some of their outer garments: this will be more conducive to their being recognized and not annoyed.(33:59)"
The following hadith indicate that the separation practiced in some Islamic societies today has little precedence in early Islamic practices:
- When Abu Usaid As-Saidi got married, he invited the Prophet and his companions. None prepared the food for them and brought it to them but his wife. She soaked some dates in water in a stone pot overnight, and when the Prophet had finished his food, she provided him with the drink.(Bukhari, Vol. 7, No. 111)
Narrated Anas ibn Malik,
- Once an Ansari woman came to the Prophet and he took her aside and said, "By God, you are the most beloved people to me."(Bukhari, Vol.7, No. 161)
Narrated Ar-Rabiʿ bint Muʿawidh,
- We used to take part in holy battles with the Prophet by providing the people with water and serving them and bringing the killed and the wounded back to Medina. (Bukhari, Vol.4, No.134) (See also Nos. 131-133 and Muslim, Nos. 4453-4460).
Other hadith also confirm that men and women eating at the same place, and even at the same table, is not haram.
Abu Hurairah reported,
- A man came to the Prophet and said; "I am hard pressed by hunger. He sent a word to one of his wives who replied: "By Him Who has sent you with the Truth, I have nothing except water. Then he sent the same message to another and received the same reply. He sent this message to all of them and received the same reply. Then he said, "Who will entertain this as guest? One of the Ansar said: "O Messenger of Allah, I will. So he took him home and said to his wife: "Serve the guest of Messenger of Allah.
Another narration is,
- An Ansari man asked his wife: "Have you got anything? She answered: "Nothing, except a little food for the children. He said: "Keep them busy with something, and when they ask for food put them to sleep. When the guest enters, extinguish the light and give him the impression that we are also eating. So they sat down and the guest ate and they passed the night hungry. When he came to the Prophet in the morning, he said to him, "Allah admired what you did with your guest last night. (Reported by Al-Bukhari and Muslim).
Based on this hadith, the scholars concluded that it is part of hospitality that the husband and wife eat with their guest.
Similarly in strict Muslim communities today, women are discouraged from going to the mosques. Yet, Muhammad specifically admonished the men not to keep their wives from going to the mosques:
Ibn Omar reported,
- The Messenger of God said, "Do not prevent the maid-servants of God from going to the mosque."(Muslim, No.888) (See also Nos. 884-891 and Bukhari Vol.1, Nos. 824, 832)
Also, it is clear from the following hadith that the women simply prayed behind the men and were not separated in a separate room or even concealed by a curtain or partition as is practiced in so many mosques today:
Asma' daughter of Abu Bakr said,
- I heard the Apostle of God say, "One of you who believes in God and in the Last Day should not raise her head until the men raise their heads lest she should see the private parts of men."(Sunan Abu Dawud, No. 850).
Thus Islam requires believers to:
- Treat one another with respect at all times in all situations.
- Behave modestly.
- Avoid situations of seclusion.
- Dress modestly.
Sex segregation in Islamic countries
Afghanistan, under Taliban religious leadership, was characterized by feminist groups and others as a "gender apartheid" system where women are segregated from men in public and do not enjoy legal equality or equal access to employment or education. In 1997 the Feminist Majority Foundation launched a "Campaign to Stop Gender Apartheid in Afghanistan", which urged the U.S. government and the United Nations to "do everything in their power to restore the human rights of Afghan women and girls." The campaign included a petition to U.N. Secretary General Kofi Annan and U.N. Assistant Secretary General Angela King which stated, in part, that "We, the undersigned, deplore the Taliban’s brutal decrees and gender apartheid in Afghanistan."
In 1998 activists from the National Organization for Women picketed Unocal's Sugar Land, Texas office, arguing that its proposed pipeline through Afghanistan was collaborating with "gender apartheid". In a weekly presidential address in November 2001 Laura Bush also accused the Taliban of practising "gender apartheid". The Nation referred to the Taliban's 1997 order that medical services for women be partly or completely suspended in all hospitals in the capital city of Kabul as "Health apartheid".
According to the Women's Human Rights Resource Programme of the University of Toronto Bora Laskin Law Library "Throughout the duration of Taliban rule in Afghanistan, the term "Gender Apartheid" was used by a number of women's rights advocates to convey the message that the rights violations experience by Afghan women were in substance no different than those experienced by blacks in Apartheid South Africa." 
When Ruhollah Khomeini called for women to attend public demonstration and ignore the night curfew, millions of women who would otherwise not have dreamt of leaving their homes without their husbands' and fathers' permission or presence, took to the streets. After the Islamic revolution, however, Khomeini publicly announced his disapproval of mixing between the sexes.
Sex segregation is also prevalent in health centres. In Saudi Arabia, a male doctor is not allowed to treat a female patient, unless there are no female specialists available; and it is also not permissible for women to treat men. A woman is also not allowed to meet her spouse unveiled until after the wedding. Saudi daughters are encouraged to wear the niqab in public.  Religious Saudis believe it is forbidden for a woman to eat in public, as part of her face would be exposed, therefore in most restaurants barriers are present to conceal women. Some have linked this conservative attitude to an increase in homosexuality in the Arab states of the Persian Gulf.
Sex segregation in mosques
It is claimed that Muhammad, the Prophet of Islam, preferred women to pray at home rather than at a mosque, although this is disputed. According to one Hadith, a supposed recounting of an encounter with Muhammad, he said:
- I know that you women love to pray with me, but praying in your inner rooms is better for you than praying in your house, and praying in your house is better for you that praying in your courtyard, and praying in your courtyard is better for you than praying in your local mosque, and praying in your local mosque is better for you than praying in my mosque.
The Prophet is also recorded to have said: "The best places of prayer for women are the innermost apartments of their houses"
Despite the recommendation that women should pray at home, Muhammad did not forbid women from entering his mosque in Medina. In fact, he also told Muslims "not to prevent their women from going to mosque when they ask for permission".
It is recorded that the Prophet of Islam ordered that Mosques have separate doors for women and men so that men and women would not be obliged to go and come through the same door. He also commanded that men should pray in the first rows and women should pray behind men. The Prophet also commanded that after the Isha evening prayer, women be allowed to leave the mosque first so that they would not have to mix with men.
After the Prophet's death, many of his followers began to forbid women under their control from going to the Mosque. Aisha bint Abubakr, the favourite wife of the Prophet, once said:
- If the Prophet had lived now and if he saw what we see of women today, he would have forbidden women to go to the mosque even as the Children of Israel forbade their women. 
As Islam spread, it became unusual for women to worship in mosques because of male fear of immorality between sexes 
Sometimes a special part of the mosque was railed off for women. For example, the governor of Mecca in 870 had ropes tied between the columns to make a separate place for women.
Many mosques today will put the women behind a barrier or partition or in another room against most Islamic beliefs. Mosques in South and Southeast Asia put men and women in separate rooms, as the divisions were built into them centuries ago. In nearly two-thirds of American mosques, women pray behind partitions or in separate areas, not in the main prayer hall; some mosques do not admit women at all due to the lack of space and the fact that some prayers, such as the Friday Jummah, are mandatory for men but optional for women. Although there are sections exclusively for women and children, the Grand Mosque in Mecca is desegregated.
Justifications for segregation, despite clear Islamic rules against this, include the need to avoid distraction during prayer, although the primary reason cited is that this was the tradition (sunnah) of worshippers in the time of the Prophet.
Sex segregation online
Muslim website developers have created websites that practise sex segregation of men and women. Such social networks enable users to interact with people of the same gender and restrict interaction with the opposite gender to a certain extent.
|40x40px||Wikiquote has a collection of quotations related to: Sex segregation and Islam|
- Awrah (Covering of body parts)
- Polygyny in Islam
- Rights and obligations of spouses in Islam
- Werner Schiffauer, "Die Gewalt der Ehre. Erklärungen zu einem deutsch-türkischen Sexualkonflikt." ("The Force of the Honour"), Suhrkamp: Frankfurt am Main, 1983. ISBN 3-518-37394-3.
- Dilek Cindoglu, "Virginity tests and artificial virginity in modern Turkish medicine," pp. 215–228, in Women and sexuality in Muslim societies, P. Ýlkkaracan (Ed.), Women for Women’s Human Rights, Istanbul, 2000.
- Hunter, D. Lyn. Gender Apartheid Under Afghanistan's Taliban The Berkleyan, March 17, 1999.
- The Taliban & Afghan Women: Background, Feminist Majority Foundation website, Accessed June 25, 2006.
- Stop Gender Apartheid in Afghanistan (PDF), Global Petition Flyer, Feminist Majority Foundation.
- Women Around the Globe Face Threats to Human Rights, National Organization for Women, Fall 1998.
- Otis, John. First lady slams 'gender apartheid', Houston Chronicle News Service, November 18, 2001.
- Block, Max. Kabul's Health Apartheid, The Nation, November 24, 1997.
- Women in Afghanistan, Women's Human Rights Resource Programme, University of Toronto Bora Laskin Law Library.
- Revolution, Islamization, and Women’s Employment in Iran, by Roksana Bahramitash
- Haghian (1988).
- McNeill (2000), p. 271.
- Abu Dawud in al-Sunan, Baab maa jaa’a fee khurooj al-nisaa’ ilaa’l-masjid: Baab al-tashdeed fee dhaalik, pg 133
- Doi, Rahi. "Ruling on women going to the masjid". Islam Q&A. http://www.islam-qa.com/en/ref/983/women%20mosque. Retrieved 2010-03-15.
- Doi, Rahi. "Can women go to mosque?". Questions on Islam. http://www.questionsonislam.com/subpage.php?s=article&aid=9841. Retrieved 2010-03-15.
- Sunan-al-Kubra, vol 1, p 109.
- Sunan-al-Kubra, vol 1, p.112
- Sunan-al-Kubra, vol 2, p.558
- At-Tafseeru'l Kurtubi, 14:244
- Doi, Abdur Rahman I.. "Women in Society". Compendium of Muslim Texts. University of Southern California. http://www.usc.edu/dept/MSA/humanrelations/womeninislam/womeninsociety.html#mosque. Retrieved 2006-04-15.
- Mattson, Ingrid. "Women, Islam, and Mosques." In Encyclopedia of Women And Religion in North America (Rosemary Skinner Keller, Rosemary Radford Ruether, and Marie Cantlon, ed.). Indiana University Press (2006), p616. ISBN 0253346886.
- Hillenbrand, R. "Masdjid. I. In the central Islamic lands". In P.J. Bearman, Th. Bianquis, C.E. Bosworth, E. van Donzel and W.P. Heinrichs. Encyclopaedia of Islam Online. Brill Academic Publishers. Template:ISSN.
- Rezk, Rawya (2006-01-26). "Muslim Women Seek More Equitable Role in Mosques". The Columbia Journalist. http://www.columbiajournalist.org/rw1_dinges/2005/article.asp?subj=national&course=rw1_dinges&id=624. Retrieved 2006-04-09.
- Religion & Ethics NewsWeekly . COVER STORY . Women in Mosques . November 12, 2004 | PBS
- The Encyclopedia of Women and Religion in North America
- Smith, Jane L. Islam in America. Columbia University Press (2000): p111. ISBN 0231109679.
- Muslim Social Network with Gender Segregation, July 29, 2009.