Firstly, the default principle established by the Islamic law is the prohibition of spying for the saying of Allāh the Almighty: “and do not spy on one another.” (49:12) and the saying of the Prophet (peace be upon him): “Do not spy on one another, and do not eavesdrop on one another.” (This Ḥadīth is agreed upon).
Secondly, the Islamic law permitted spaying in some cases. For example, spying against enemies, oppressors, and instigators of discord and evil, in order to protect society. An-Nawawiy stated in his explanation of Ṣaḥīḥ Muslim: “The one who enjoins good is not allowed to search, investigate, spy, or enter homes out of suspicion. However, if he comes across an evil that he can change, he should make an effort to change it.” The most just judge Al-Māwardiy said: “The inspector is not allowed to investigate the unrevealed evils. However, if a clue or an impact of an evil accounts for being evil secretly done, this falls under one of two types: first type is an evil that cannot be stopped later. For example, if he [the inspector] is informed by a trustworthy person that a person is secluded with another person to kill him or with a woman to have illegal sexual intercourse with her. In such a case, he [the inspector] is allowed to spy on them and investigate and reveal the incident lest it cannot be stopped later. Similarly, if a volunteer, who is not an inspector, knows [about the incident], it is permissible for him to investigate and disallow it.”
Thirdly, the subject of the question needs elaboration. Some issues arise: do the husband and the wife tolerate this act and accept it? Is there any reason for suspicion and investigation? Who did the act?
The first issue, if the act of investigation is usually accepted and tolerated by the spouses due to their mutual warmth or dispelling suspicion, it is considered to be done with permission. This is analogous to the permissibility of eating from the house of one’s brother, sister, or friend without permission if acceptance of such act is known previously.
The second issue, if there is something that calls for suspicion which warrants intervention, investigation is allowed only for the husband because he is entitled to take care of the wife, for the saying of the Prophet (peace be upon him): “Each of you is [like] a shepherd and each of you is responsible for his flock.” (This Ḥadīth is agreed upon). The ruling extends to monitoring the situation of the wife and the children. For the wife, she does not have this permission because she is not entitled to take care of the husband nor admonish him. However, she is entitled to do so with her children.
If there is nothing that warrants suspicion, none of the above is permissible. Jābir ibn ʽAbdullāh, may Allāh be pleased with him, said: “The Messenger of Allāh (peace be upon him) disapproved that a man should come [suddenly] to his family during the night (after returning from a journey)” (This Ḥadīth is agreed upon). In another narration by Muslim: “The Messenger of Allāh (peace be upon him) forbade that a man should come [suddenly] to his family like (an unexpected) night visitor doubting their fidelity and spying into their lapses.”
The third issue, the default principle established by the Islamic law sets no right for the wife in this regard as previously stated. For the husband, he has the right of investigation in the previously described way, otherwise he does not have this right, and investigation is forbidden on him.
After all, Allāh knows best.
Fatwa by Dr. Khālid Naṣr