In many societies today, a handshake, hug or even a kiss on the cheek is seen as nothing out of the ordinary and is even viewed as part of everyday good manners. Nevertheless, a Muslim would be uncomfortable with sharing such physical gestures with members of the opposite gender unless they were close family or a spouse. This may puzzle our colleagues and acquaintances, but there is a reason for this.
Islam is a religion that is a complete code of life, and Muslims look to the Qur’an, the sacred revealed book of God, as well as the life and words of the Prophet Muhammad (sa) for guidance on carrying out all their activities.
The Prophet Muhammad (sa) never touched a woman who wasn’t his wife or a close family member, not even to accept their oath of allegiance.  Shaking hands and hugging others of the same gender is perfectly acceptable though.
Nevertheless, it is important to understand the motivations behind this teaching, especially in an atmosphere where others may feel insulted if their Muslim acquaintance refuses to share with them what they see as simple physical gestures of greeting and goodwill.
To understand this injunction, it is necessary to have a wider understanding of Islamic principles regarding inner purity, sex and marriage.
Muslims are taught that sex and physical intimacy with a member of the opposite gender is something special and should only be shared between husband and wife.
Islam does not permit fornication or adultery. This means that a Muslim should live a life of celibacy until they are married. Dating and premarital relations are also not allowed. Moreover, Islam teaches that a Muslim should not fill his heart with sexual thoughts, rather should control his urges and avoid watching, listening to or doing any action which will needlessly increase his sexual desire. This build-up of sexual desire coupled with an active imagination will sap his concentration and direct his energies towards what in many cases are ultimately fruitless ends. It is based on this principle of prevention and abstinence that Islam instructs Muslims to not stare at unrelated members of the opposite gender, but rather to lower their gaze and guard their chastity. 
This system keeps the minds and hearts of Muslims free from many different types of ills and perversions, as well as saving people from the ills of short-term intimate relationships that are not linked with long-term responsibility and commitment – the key distinction between marriage and dating.
A further result of this abstinence is that Muslims become highly sensitized to physical contact in general with the opposite gender. This doesn’t mean that Muslims ‘lose control’ if touched or approached by a member of the opposite gender. Muslims who are instructed to practise abstinence before marriage and piety their whole lives are no strangers to self-control. Rather, this sensitivity to physical contact with the opposite gender serves to deepen the relationship between husband and wife and make physical contact between them that much more special and intimate. Nevertheless, it also means that Muslims are uncomfortable in sharing physical contact with unrelated members of the opposite gender.
Moreover, it would be incorrect to think that those that are accustomed to such gestures become totally immune to their natural sexual repercussions. Humans are biological creatures. Like all mammals, they are endowed with a sexual nature. It is inevitable that certain physical cues and suggestions from members of the opposite gender will bring about certain responses associated with that ingrained nature. Sight and hearing, combined with touch, pressure, smell, and heat; these and other physical sensations are conveyed through the aforementioned gestures which in turn are interpreted by our minds on a conscious and subconscious level. Physical attraction and sexual arousal exist to a large extent on the subconscious level. We cannot consciously decide what is attractive to us and what isn’t. Even unwillingly, a combination of such cues can lead to a person becoming attracted or aroused.
According to one study by the British Psychological Association, the ‘effects of touch are largely “bottom up” – that is, based mainly on the incoming stimulation – rather than “top down”, to do with beliefs about the meaning of the touch.’ Moreover, touch when coupled with visual stimuli, ‘boosts empathy and increases the likelihood that the touch recipient acting in favour of the toucher.’ 
Some may even act upon these impulses, resulting in unwanted advances or the formation of illicit relationships. Even if they don’t follow through, such thoughts can linger and negatively affect their personal spiritual well-being as well as their relationship with their significant other.
It is for reasons like these that not only Muslims but many others are uncomfortable with the idea of physical touch with unrelated members of the opposite gender. According to one survey in the UK of 2000 workers, 76% supported ending all physical contact at work. One in four of the adults surveyed stated that they actively avoided colleagues or clients due to their choice of greeting. 
Islam teaches us that man has been created for the worship of God. To live a holy life that is pleasing to our Creator, we must be conscious of our human nature and the various influences and factors that impact our inner purity while striving to minimize those that may drive us to undesirable temptations and consequences. Islam teaches that prevention is preferable to cure, and that a righteous individual not only avoids what is openly and patently sinful, but even those actions that may seem to be minor and trivial but can eventually lead us to temptation and sin. These small steps are like the footsteps of Satan in the sand, which could lead us slowly but surely from secure land to the perils of the open water. As the Qur’an poignantly states:
‘O ye who believe! follow not the footsteps of Satan, and whoso follows the footsteps of Satan should know that he surely enjoins immorality and manifest evil. And but for the grace of Allah and His mercy upon you, not one of you would ever be pure, but Allah purifies whom He pleases. And Allah is All-Hearing, All-Knowing.’ 
It is thus obvious that, contrary to certain perceptions, Islam does not prohibit physical touch between the genders because it views one as being inherently inferior to the other or that one gender is ‘unclean’ in some aspect. Islam teaches that both men and women are the creation of God and equal before him in stature. Superiority is not by virtue of gender, rather by the level of righteousness a person displays. Allah states in the Qur’an:
‘O mankind, We have created you from a male and a female; and We have made you into tribes and sub-tribes that you may recognize one another. Verily, the most honourable among you, in the sight of Allah, is he who is the most righteous among you. Surely, Allah is All-knowing, All-Aware.’ 
A Muslim will thus prefer to not touch an unrelated member of the opposite gender and instead greet them verbally. Islam teaches us a beautiful prayer by which Muslims should greet each other. That prayer is:
Which means, may the peace of Allah be upon you. Muslims readily extend this greeting not only to each other but also to their non-Muslim acquaintances.
If this avoidance of physical contact seems awkward for others, then it is doubly so for Muslims. Where Islam teaches that a Muslim must adhere to the teachings set forth by Allah, it also teaches that a Muslim should respect the feelings of others and be accommodating as far as possible. Insulting a person is not permitted in Islam, but what should you do when following your religion is precisely what is insulting to the other? Time and again, upon denying a handshake here and a hug there, Muslims feels obligated to explain themselves over and over to avoid insulting their non-Muslim friends and colleagues. Sadly, despite our best efforts, the suddenness of many of these interactions leave many of our dear acquaintances with a sour initial experience.
A better way forward is to create an atmosphere of tolerance and understanding where religious practices and customs are respected; not viewed with disdain or suspicion. A greeting is meant to convey acknowledgement and goodwill. Physical contact is definitely not the only way to convey these sentiments. Hindus and Buddhists join their hands together and bow when greeting each other, and the Japanese are famous for bowing to one another. Muslims pray for each other, and only avoid physical contact with members of the opposite gender. We may have different methods of showing affection and friendship but getting hung up on the form, in this case, will make us lose the essence of what we are trying to achieve. Let us permit our hearts to acknowledge one another and be united in spirit. If we can do that, then the physical aspect should cease to matter.
About the Author: Azhar Goraya is a graduate from the Ahmadiyya Institute of Languages and Theology in Canada. He is currently serving as an Imam of the Ahmadiyya Muslim Community in Mexico. He is also the Central American Coordinator for The Review of Religions en Español.
لاَ وَاللَّهِ مَا مَسَّتْ يَدُ رَسُولِ اللَّهِ صلى الله عليه وسلم يَدَ امْرَأَةٍ قَطُّ، غَيْرَ أَنَّهُ بَايَعَهُنَّ بِالْكَلاَمِ (صحیح البخاری، کتاب الطلاق، باب إِذَا أَسْلَمَتِ الْمُشْرِكَةُ أَوِ النَّصْرَانِيَّةُ تَحْتَ الذِّمِّيِّ أَوِ الْحَرْبِيِّ، حدیث ۵۲۸۸)
“By Allah, and hand of Allah’s Messenger (sa) never touched the hand of any woman, but he only used to take their pledge of allegiance orally.” (Sahih Bukhari, the Book of Divorce, Chapter: If an idolatress or a Christian woman becomes a Muslim while she is the wife of Dhimmi or a Mushrik at war with the Muslims?, Hadith #5288)
 Holy Qur’an 24:31-32
 The British Psychological Society. “Why is Touch on the Arm so Persuasive?”. https://digest.bps.org.uk/2011/07/06/why-is-a-touch-on-the-arm-so-persuasive/. Accessed August 1, 2021.
 https://www.fox5dc.com/news/survey-finds-over-75-of-employees-want-physical-contact-banned-at-work. Accessed July 22, 2021.
 Holy Qur’an 24:22
 Holy Qur’an 19:12