– Since the mosque and what goes on in it signify an extremely serious affair, children and madmen are to be kept away from it whenever considered necessary. Unless they are supervised by a parent or a guardian, children are not to linger there (Sunan Ibn Majah).
– On one occasion the Prophet retired to the mosque and heard some people reciting the Quran in a loud voice. He told them, promoting order, peace and serenity in mosques:
“Everyone of you should call his Lord quietly. One should not trouble the other and one should not raise the voice in recitation or in prayer over the voice of the other” (Sunan Abi Dawud).
– The Prophet prohibited buying and selling in mosques, announcing aloud about a lost thing, reciting valueless and objectionable poems, and sitting in a circle on Friday before the Jumu’ah prayer (Sunan Abi Dawud).
The Prophet (peace be upon him) prohibited the recital of worthless and objectionable poems in mosques as he felt that such was nonsensical and did not serve the cause of Islam. As for sitting in circles on Friday before the prayer, it was prevented because it might disturb those who used to come to the mosque as early as possible and carry out their spiritual activities, as encouraged by the Prophet (peace be upon him).
– The Prophet (peace be upon him) also prohibited that quarrels, noisy arguments, fights and punishments take place inside the mosque. Anything that can generate harm to the people or to the mosque and its surroundings, both natural and man-made, is to be shunned in mosques (Tafsir Ibn Kathir).
– Every illegitimate action committed in mosques is to be corrected with a great degree of patience, wisdom and kind advice. The sanctity of mosques is to be honored in the process and at the same time be imparted in the most beautiful and effective ways to those who are yet to perceive and imbibe it.
– The Prophet (peace be upon him) insisted that mosques belong to everybody and that reserving certain places for certain people — like a camel which fixes its place — is not acceptable (Sunan Abi Dawud).
All the artificial and superficial worldly categorizations of, and differences between, the people come to an end once the people find themselves in the ambit of mosques. The mosque is blind to worldly status, titles and designations.
– Certain supplications have been prescribed for entering and leaving the mosque. On entering the mosque, Muslims are advised to pray before sitting two rak’ahs, or two units, of a prayer called tahiyyah al-masjid (a way of greeting and honoring the mosque). On the way to the mosque, another supplication is to be recited. Mosques are to be entered with right leg, and exited with left leg.
– The mosque is not to be made a thoroughfare. However, a person can go through a mosque, without praying or performing any other act of worship inside it, only if he or she has no other alternative.
– When coming to and entering the mosque, Muslims are bidden to portray a sober, calm and dignified deportment. No running or scrambling is allowed. One is not to enter the mosque unconsciously, talking and laughing loudly and loosely, as if one is not aware of the place where he actually is. When coming to or leaving the mosque, men and women are not to mingle freely in the road. They are to keep to different sides (Sunan Abi Dawud).
Going to the mosque means subjecting one’s self to a spiritual process which intensifies as one approaches the mosque, and which reaches its acme when one enters the mosque and starts to pray. Muslims have got to do whatever it takes so that this spiritual process is optimized. Everything that hinders, it follows, is to be avoided.
– When going to the mosque, Muslims are advised to wear their beautiful adornments and apparel. However, even here when one solemnly applies his mind to the presence of Allah, the caution against excess applies (7:31).
Once the Prophet (peace be upon him) was in the mosque when a man came in with disheveled hair and beard. The Prophet (peace be upon him) motioned with his hand that he should be sent out to groom his hair and beard. The man did so and then returned. The Prophet (peace be upon him) thereupon said:
“Isn’t this better than that one of you should come with his head disheveled as if he were a shaytan (Satan)” (Muwatta’ Malik ibn Anas).
– Sleeping and eating inside the mosque are not disallowed, especially when they are part of, or are integral to, some either obligatory or voluntary worship activities, such as praying, reading the Quran, contemplating and studying; when a person is a traveler and needs rest; and when a person performs the al-i’tikaf (full-time retreat in the mosque especially during the last third of the holy month of Ramadan) which is a highly recommended voluntary act. However, for a person to go to the mosque just to eat or sleep there without intending to perform any worship deed, that is not recommended.
– Reclining in the mosque for the purpose of resting is generally allowed. However, general ethical norms apply here, such as not doing it when there are serious functions going on and there are many people around, ensuring that one’s ‘awrah (parts of the body that must be properly covered in certain situations and under certain circumstances) is not exposed, etc.
In short, one’s self-respect and his respect of others ought to be duly observed. A majority of scholars disapproved of stretching legs towards the qiblah (direction of prayers) either in sitting or reclining postures.
– A Muslim man with janabah, or ritual impurity caused by the discharge of semen or by sexual intercourse, cannot stay in the mosque for whatever reasons until he performs ghusl or ritual bath. However, he can pass through the mosque if he needs to by entering from one door and leaving from the other (4:43).
– A Muslim woman, too, is not allowed to enter the mosque when she is menstruating or bleeding following childbirth. However, simply passing through is allowed, if she needs to and she is certain that she will not make the mosque impure, i.e., by drops of blood falling on the floor.