Answer
Assalamu Alaykum Dear Moshtaha,
Thank you so much for your question and for contacting Ask About Islam.
Maybe you mean the hadith in which the Prophet (peace and blessings be upon him) said:
“…Satan is the third person in an isolated area ( khalwah) where there is only a man with a (non-mahram) woman…” (Ibn Al-Atheer – Sahih)
Here, the Prophet (peace and blessings be upon him) is talking about a man and a woman in khalwah or isolation (modern examples are a closed office, an elevator, out in the forest, etc.). This is forbidden from the point of view of cutting the roots of sins, because evil thoughts or even harassment—from the man or the woman—is a very possible outcome of this isolation.
Men and women’s gathering in public is all forbidden according to some scholars, but many others think that there is no single rule that covers this area; I personally agree with the latter view.
I think that it really depends on the persons themselves, the purpose of the meeting, the intentions, the place of the meeting, and all surrounding circumstances. If this one-on-one meeting—in public—is leading to any forbidden or suspicious act, then it is forbidden.
The public relationship between men and women in the Islamic society is a matter that has two extremes and a “happy medium.”
One extreme behavior (which really isn’t Islamic at all) does not follow any guidelines regarding men and women’s relationship, and chooses to ignore all of Allah’s commands and Prophet Muhammad’s advice (peace and blessings be upon him).
The other extreme opinion imagines that the ideal Muslim society is actually two societies: one for men and the other for women. I will elaborate more on this latter opinion, since its holders quote the Qur’an in their argument.
People who support the “two societies” view say that the “barrier” between men and women is mentioned in the Qur’an. The verse they refer to has come to be named, “The Verse of the Barrier” ( Ayat Al-Hijab). It says what means:
{And when you ask of them (the wives of the Prophet) anything, ask it of them from behind a curtain/barrier. That is purer for your hearts and for their hearts.} (Al-Ahzab 33:53)
The context of the verse here refers to specific rulings that the Companions should follow when they visit the Prophet’s home. Furthermore, the verse was revealed after the Companion Umar had cautioned the Prophet (peace and blessings be upon him) that some of his visitors did not deal respectfully with his wives (Al-Shawkani,Fath Al-Qadir, vol. 4, p. 299, Dar Al-Fikr, Beirut).
Yet, the verse was claimed to have abrogated numerous narrations that allow Muslim women to lead normal lives, for example, leaving their homes (Ibn Hajar,Fathul-Bari Sharh Sahih Al-Bukhari), showing their faces in public (Ibn Taymiyah,Kutub wa Rasa’el Ibn Taymiyah fi Al-Fiqh), visiting or being visited by men (Al-Azim Abadi, Awn Al-Ma`bud), talking with men (Imam Al-Nawawi (quoting Al-Qadi `Eyadh), Sharh Al-Nawawi `ala Sahih Muslim), and even narrating the Hadith (Abul-`Ila Al-Mubarkafuri, Tuhfat Al-Ahwathi).
Both of the above extreme opinions are at odds with what we all know about the Companions’ society led by the Prophet (peace and blessings be upon him). Any quick look at the Hadith collections prove that.
Hope this answer is satisfactory. Thank you again for contacting us and please keep in touch.
Salam.