Being alone with a non-mahram – Khalwa.
Shaytaan is always keen to tempt people and make them commit haraam deeds. For this reason, Allaah warned us (interpretation of the meaning):
“O you who believe! Follow not the footsteps of Shaytaan. And whosoever follows the footsteps of Shaytaan, then, verily he commands al-fahshaa’ (indecency) and al-munkar (evil deeds) . . .” [al-Noor 24:21]
Shaytaan runs through the veins of mankind like blood, and one of the ways in which he induces people to commit indecent acts is by leading a man to be alone with a non-mahram woman. Islaam blocks this way by forbidding such conduct, as the Prophet (peace and blessings of Allaah be upon him) said:
“No man is alone with a (non-mahram) woman, but Shaytaan will be the third among them.” (Reported by al-Tirmidhi, 3/474; see also Mishkaat al-Masaabeeh, 3118).
Ibn ‘Umar (may Allaah be pleased with him and his father) reported that the Prophet (peace and blessings of Allaah be upon him) said:
“From this day on, no man should enter upon a woman whose husband is absent unless there is another man or two with him.” (Reported by Muslim, 4/1711).
It is not permitted for a man to be alone in a house, room or car with a non-mahram woman, including his brother’s wife or a servant.
Al-Bukhaari (1862) and Muslim (1341) narrated that the Prophet (peace and blessings of Allaah be upon him) said:
“No man should be alone with a woman unless her mahram is with her.”
Al-Nawawi (may Allaah have mercy on him) narrated in Sharh Muslim (14/153) that there is scholarly consensus that it is haraam for a man to be alone with a non-mahram woman. This was also mentioned by al-Haafiz in al-Fath (4/77).
What is meant by a man being alone with a woman is that they are alone together in a place with no one else present. Whoever gives up a thing for the sake of Allaah, Allaah will compensate him with something better than that.
The Muslim has to understand things as they are and what they lead to, and not be tempted by the things that the Shaytaan makes attractive, or be deceived when the Shaytaan tries to make him think of evil actions as insignificant as a trick to make people join his party of losers. He has to fear Allaah his Lord in private and in public, and know that Allaah sees him and knows his intentions and his actions, as Allaah says (interpretation of the meaning):
“Allaah knows the fraud of the eyes, and all that the breasts conceal.” [Ghaafir 40:19]
Taken from Islam QA