The Prophet ﷺ loved palm-branch sticks and would always hold one in his hand. He entered the mosque and saw mucus on the qiblah wall of the mosque, so he scraped it off. Then he turned to the people in anger and said, "Would any of you be pleased if someone spat in his face? When one of you faces the qiblah, he is only facing his Lord , and the angel is on his right. So let him not spit to his right, nor in front of him toward the qiblah. Let him spit to his left or beneath his foot. If something forces him to act quickly, then let him do like this." Ibn Ajlan demonstrated it for us, that he should spit into his garment and then fold part of it over the other.
أن النبي ﷺ كان يحب العراجين ولا يزال في يده منها، فدخل المسجد فرأى نخامة في قبلة المسجد فحكها، ثم أقبل على الناس مغضبا فقال: أيسر أحدكم أن يبصق في وجهه؟ إن أحدكم إذا استقبل القبلة فإنما يستقبل ربه عز وجل، والملك عن يمينه، فلا يتفل عن يمينه، ولا في قبلته. وليبصق عن يساره أو تحت قدمه، فإن عجل به أمر فليقل هكذا. ووصف لنا ابن عجلان ذلك: أن يتفل في ثوبه ثم يرد بعضه على بعض.
Abu Dawud (480) narrated it from Yahya bin Habib (bin Arabi), who said, Khalid, that is, Ibn Harith, narrated to us, from Muhammad bin Ajlan, from Iyad bin Abdullah, from Abu Saeed Khudri, and he related it. Its chain is hasan because of Muhammad bin Ajlan, for he is truthful (saduq). Ibn Khuzayma (880), Ibn Hibban (2270), and Hakim (1/251) also transmitted it, all in their sahih collections, through routes from Muhammad bin Ajlan in the same manner. Hakim said, "Sahih according to the criterion of Muslim."Ibn Khuzayma (926) also narrated it through another route from Abu Saeed, who said, The Messenger of Allah ﷺ saw phlegm on the qiblah wall of the masjid, so he cleared it away with a stick he had with him. Then he turned to the people, and they could recognize the anger on his face, and he said, "Which of you spat this phlegm?" They fell silent. He said, "Would any of you like it, if he stood to pray, that a man should face him and spit in his face?" They said, "No." He said, "Allah is before you in your prayer, so do not direct any impurity in front of you, but rather to the left of one of you or beneath his foot."Its chain is sahih. It is also found in the Sahihayn through another route, in abbreviated form, from him and from Abu Hurairah together, and also from him alone, as mentioned previously.