Anas said that the Prophet saw some mucus in the direction of the qibla and his displeasure was apparent in his face, so he got up, scraped it with his hand and said, “When one of you gets up to pray, he is holding intimate converse only with his Lord, and his Lord is between him and the qibla, so none of you must spit in the direction of the qibla, but towards his left side, or under his foot.” Then he took the end of his cloak, spat in it, folded it up and said, “Or he may do thus.”
Malik said that ‘Umar built a courtyard called al-Butaiha’ in the neighbourhood of the mosque and said, “If anyone wants to make a noise, or recite poetry, or raise his voice, he must go out to this courtyard.”
Narrated As-Sa'ib b. Khallad, who was one of the Prophet's companions, said:
A man led some people in prayer and spat in the direction of the qibla. Having seen this, God’s Messenger said to the people at the end of the prayer, “He must not lead you in prayer.” The man wanted to lead them in prayer some time afterwards, but they prevented him and told him what God's Messenger had said. He mentioned that to God’s Messenger, who replied, “Yes.” And I think he added, “You have harmed God and His Messenger.’’
As-Sa'ib b. Yazid said that when he was sleeping in the mosque a man threw a pebble at him, and when he looked he saw that it was ‘Umar b. al-Khattab, who said, “Go and bring me these two men.” He brought them and ‘Umar asked them what tribe they belonged to, or what place they came from. On their replying that they belonged to at-Ta’if, he said, “If you had belonged to Medina I would have given you a beating for raising your voices in the mosque of God’s Messenger.