Rules regarding a Masjid
909. It is Haraam to make the floor, roof, ceiling and inner walls of a Masjid Najis, and as and when a person comes to know that any of these parts has become Najis, he should immediately make it Pak. And the recommended precaution is that the outer part of the wall of a Masjid, too, should not be made Najis.
And if it becomes Najis, it is not obligatory to remove the Najasat. But if someone makes it Najis to violate its sanctity, that act is Haraam, and the Najasat should be removed.
910. If a person cannot make a Masjid Pak, or needs help which is not available, then it is not obligatory for him to make it Pak. But if he feels that the Masjid will be made Pak if he informs others, then he should do so.
911. If a place in a Masjid becomes Najis, and it cannot be made Pak without digging or demolishing it, the place should be dug or demolished, provided that it is minimal, or if its demolition is absolutely necessary for saving its sanctity. Otherwise, demolition is a matter of Ishkal. However, it is not obligatory to refill the dug area, or to rebuild the demolished part. But if a small item, like a brick of a Masjid became Najis, it should be put back to its place after making it Pak.
912. If a Masjid is usurped, and houses etc. are built in its place, or if it becomes so dilapidated that it can no more be called a Masjid, even then, as a recommended precaution, it should not be made Najis. But if it becomes Najis, it is not obligatory to make it Pak.
913. It is Haraam to make the precincts (Haram) of the Holy Shrines Najis, but if anyone of these precincts become Najis, and if its remaining in that state affects its sanctity, then it is obligatory to make it Pak. And the recommended precaution is that it should be made Pak, even if no desecration is involved.
914. If the mat of a masjid becomes Najis, it should be made Pak. If the mat remaining Najis affects the sanctity of the Masjid, but washing may spoil or ruin the mat, then that part which has become Najis should be cut off.
915. It is Haraam to carry any Najisul Ayn or a thing which has become Najis, into a Masjid, if doing so desecrates the Masjid. In fact, the recommended precaution is that even if desecration of the Masjid is not involved, Najisul Ayn should not be carried into it.
916. If a Masjid is draped with black cloth, or covered with a marquee in preparation of Majlis to be read there, and tea is prepared, there will be no objection to all that if they do not have any harmful effect on the Masjid, and if it does not obstruct those who come to pray.
917. The obligatory precaution is that a Masjid should not be adorned with gold, and the recommended precaution is, that it should not be adorned with the pictures of men and animals.
918. Even when a Masjid is ruined, it is not permissible to sell it, or to make it a part of a property, or a road.
919. It is Haraam to sell doors, windows, and other things of a Masjid, and if the Masjid becomes dilapidated, those things should be used for the renovation of the same Masjid. If they are not useful for that Masjid they should be used in any other Masjid, and if they are not of any use for other Masjids also, then they may be sold, and the proceeds should be used for that very Masjid, if possible. If that is not possible, then it should be spent on the repairs of any other Masjid.
920. Building a Masjid and renovating a dilapidated Masjid is Mustahab. And if a Masjid is so ruined, that it is not possible to repair it, then it can be demolished and rebuilt. In fact, a Masjid which may not be in a bad state can be demolished for extension, to facilitate the needs of the people.
921. To keep a Masjid clean and tidy, and to illuminate it, is Mustahab. And for a person visiting a Masjid, it is Mustahab to apply perfume, and wear neat and good dress and to ensure that the soles of his shoes do not contain any Najasat, and when entering the Masjid, to put his right foot in first, and on exit, to put his left foot out first. Similarly, it is Mustahab that one should come to the Masjid earlier than others, and leave it after they have departed.
922. It is Mustahab that when a person enters a Masjid, he should offer two Rak’at prayers as gesture of greeting and respect to the Masjid, but it will suffice if he offers any obligatory or Mustahab prayers.
923. It is Makrooh to sleep in a Masjid, except when helpless, and to talk about worldly affairs, to engage oneself in some craft, and to recite poetry, which is not religiously instructive. It is also Makrooh to spit or throw phlegm or mucus from the nose, in a Masjid, or to shout or raise one's voice, except for Adhaan.
924. It is Makrooh to allow an insane person to enter a Masjid, and also a child if it causes inconvenience to the people praying, or if it is feared that it might make the Masjid Najis. In absence of these two reasons, there is no harm in allowing the children. Similarly, for people who have eaten onions, garlic etc. and their bad breath may upset others, it is Makrooh to go to the Masjid.