Humayd bin Abd al-Rahman narrates that he heard Sayyiduna Abu Hurayrah and Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with them both) say that the Messenger of Allah (peace and blessings be upon him) saw phlegm on the qiblah wall, so he took a pebble and scraped it off, then said: "None of you should spit towards the qiblah, nor to his right; rather, let him spit to his left or under his left foot."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3601
Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) says that the Messenger of Allah (peace and blessings be upon him) saw spittle on the qiblah wall, so he scraped it off, then turned towards the people and said: "None of you should spit towards the qiblah in prayer, nor in front of his face, for when he is praying Allah Almighty is in front of him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3602
Sayyiduna Ibn Umar (may Allah be pleased with them both) narrates that once, while the Messenger of Allah (peace and blessings be upon him) was delivering a sermon, he suddenly saw phlegm on the qiblah wall, so he became angry with the people and said: "Allah Almighty is in front of you. When anyone prays, let him not spit in front of him, nor throw out phlegm." Then he came down (from the pulpit), scraped it off and applied something there. I think he had saffron brought and rubbed it on the wall. Sayyiduna Ibn Umar (may Allah be pleased with them both) said: "When one of you spits out phlegm, let him spit it to his left."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3604
It is narrated from Sayyidah Aishah (may Allah be pleased with her) that the Prophet (peace and blessings be upon him) saw spittle, phlegm or nasal mucus on the qiblah wall, and he scraped it off.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3605
Hadith Gradingمحدثین:صحيح
Hadith Takhrij«صحيح۔ اخرجه البخاري 399۔ اخرجه مسلم 549»
(a) It is narrated from Ubadah bin al-Walid bin Ubadah bin al-Samit: We came to Jabir bin Abdullah (may Allah be pleased with them both) in his mosque. He related: We were present with the Messenger of Allah (peace and blessings be upon him) in the mosque. In his (peace and blessings be upon him) hand was a palm stalk of the kind called Ibn Tab. He (peace and blessings be upon him) looked around and saw phlegm on the qiblah side of the mosque, and he (peace and blessings be upon him) scraped it off with the stalk. Then he (peace and blessings be upon him) said: "Which of you would like Allah Almighty to turn His face away from him?" We became fearful. He (peace and blessings be upon him) said: "Which of you would like Allah to turn His face away from him?" We said: O Messenger of Allah! None of us would like that. He (peace and blessings be upon him) said: "When any one of you prays, Allah Almighty is in front of him, so no one should spit in front of him or to his right; rather, let him spit to his left, under his foot. If phlegm comes suddenly, then let him do like this with his garment." Then he (peace and blessings be upon him) rubbed his garment together and said: "Bring some 'abir perfume." A young man of the tribe got up, ran to his home and came back with khaluq perfume in his palm. The Messenger of Allah (peace and blessings be upon him) took the perfume, put it on the tip of the stalk, then applied it to the trace of the phlegm.
(b) Jabir (may Allah be pleased with them both) said: It is on this basis that you apply perfume in the mosques.
(c) In the narration of Harun bin Ma'ruf it is: "Let him spit to his left, under his left foot."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3606