Jabir bin Abdullah reported,

He was in his mosque when he said, "The Messenger of Allah ﷺ came to us in this mosque of ours with a stalk of Ibn Tab dates in his hand. He looked and saw some phlegm on the qiblah wall of the mosque, so he went up to it and scraped it off with the stalk."Then he said, "Which of you would like Allah to turn His face away from him?"Then he said, "When one of you stands to pray, Allah is before his face, so he must not spit in front of him, nor to his right. Let him spit to his left, under his left foot. And if something comes upon him suddenly, let him do like this with his garment," and he placed it on his mouth and rubbed it together.Then he said, "Bring me some perfume."A young man from the neighborhood got up and ran to his family, then came back with some scented paste in the palm of his hand. The Messenger of Allah ﷺ took it, placed it on the tip of the stalk, and smeared it over the spot where the phlegm had been.Jabir said, "It is from there that you came to place perfume in your mosques."

Abu Dawud 485

Sahih

حدثنا يحيى بن الفضل السجستاني وهشام بن عمار وسليمان بن عبد الرحمن الدمشقيان بهذا الحديث وهذا لفظ يحيى بن الفضل السجستاني قالوا حدثنا حاتم بن إسمعيل حدثنا يعقوب بن مجاهد أبو حزرة عن عبادة بن الوليد بن عبادة بن الصامت أتينا

جابرا يعني ابن عبد الله

وهو في مسجده فقال أتانا رسول الله ﷺ في مسجدنا هذا وفي يده عرجون ابن طاب فنظر فرأى في قبلة المسجد نخامة فأقبل عليها فحتها بالعرجون ثم قال أيكم يحب أن يعرض الله عنه بوجهه ثم قال إن أحدكم إذا قام يصلي فإن الله قبل وجهه فلا يبصقن قبل وجهه ولا عن يمينه وليبزق عن يساره تحت رجله اليسرى فإن عجلت به بادرة فليقل بثوبه هكذا ووضعه على فيه ثم دلكه ثم قال أروني عبيرا فقام فتى من الحي يشتد إلى أهله فجاء بخلوق في راحته فأخذه رسول الله ﷺ فجعله على رأس العرجون ثم لطخ به على أثر النخامة قال جابر فمن هناك جعلتم الخلوق في مساجدكم

أبو داود 485صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer
Chapter
Dislike of spitting in the masjid
Numbering
Darussalam 485
Abu Dawud 485