Maliks Muwatta Book 14, Hadith Number 4.

Section : The Prohibition against Spitting towards the Qibla.

Yahya related to me from Malik from Nafi from Abdullah ibn Umar that the Messenger of Allah, may Allah bless him and grant him peace, saw spittle on the wall of the qibla and scraped it off. Then he went up to the people and said, “Do not spit in front of you when you are praying, because Allah, the Blessed and Exalted, is in front of you when you pray.”