Qasim bin Mehran Al-Qaisi narrated, I heard Abu Rafi’ narrating from Sayyiduna Abu Hurairah (may Allah be pleased with him) from the Messenger of Allah (peace and blessings be upon him), he said: "When any of you is in prayer, he should not spit in front of him nor to his right side, but should spit under his left foot. If he cannot do so, then he should spit on the edge of his garment and do like this," and he rubbed his garment.
Hadith Referenceمسند اسحاق بن راهويه / كتاب الصلوٰة / 131
Hadith Takhrij«السابق»
Explanation & Benefits
Hafiz Abdush Shakoor Tirmidhi
Benefits: From the aforementioned hadith, it is understood that the mosque should be kept clean and one should avoid any action that is contrary to the cleanliness of the mosque. Spitting to the left is only permissible when the ground of the mosque is unpaved and there is no mat or the like spread over it; in that case, it is permissible to spit under the left foot. Another condition is that there should not be any worshipper on the left side; if there is, then it is not permissible to spit to the left either. And if one has spat to the left, then it is necessary to conceal the spit or to clean it by rubbing it with the foot.
Imam Shawkani rahimahullah says: If someone spits in the mosque and it is not possible to bury it, then this spitting will be a sin for which no expiation has been made. (As-Sayl al-Jarrar: 1/182)
Hafiz ‘Iraqi rahimahullah says: From the aforementioned hadith, it is also understood that the worshipper, during prayer, is engaged in intimate discourse (munajat) with Allah Dhul-Jalal; wherever he is performing the prayer, he should not spit in front of himself nor to his right side, because the angel is on the right side. (Tarf at-Tathrib: 2/380) Especially, there is a severe warning against spitting in the direction of the qiblah.
It is thus understood that to spit while engaged in intimate discourse and whispering with Allah is contrary to proper etiquette.