Khilwa, in Shariah law, is an offense consisting of being caught alone in private with a member of the opposite sex who is not an immediate family member.[1][2][3][4]
For example, in Malaysia in 2009, 197 students "were caught for khalwat" in the state of Kuala Terengganu within seven months. Muslims there who are unmarried, non-relatives of a person of the opposite sex can be apprehended by state religious police under the offence of khalwat (being in "close proximity" as The Star Online described it). Religious Department enforcement officers can conduct "checks, surveillance and raids to curtail khalwat cases," catch "students from secondary schools and higher learning institutes...for khalwat" and advise "youth organisations and student leaders on the bane of committing khalwat."[5]
The prohibition of khalwa in Islam is comparable to that of in Judaism of the equivalent concept of yichud.