عَنْ أَنَسِ بْنِ مَالِكٍ رَضِيَ اللَّهُ عَنْهُ أَنَّ نَبِيَّ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ: ((النُّخَامَةُ فِي الْمَسْجِدِ خَطِيئَةٌ وَكَفَّارَتُهَا دَفْنُهَا))
It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: Spitting in the mosque is a sin, and its expiation is to bury it.