(3) باب النَّهْيِ عَنْ بِنَاءِ الْمَسَاجِدِ عَلَى الْقُبُورِ وَاتِّخَاذِ الصُّوَرِ فِيهَا وَالنَّهْيِ عَنِ اتِّخَاذِ الْقُبُورِ مَسَاجِدَ
'A'isha and Abdullah reported:
As the Messenger of Allah (ﷺ) was about to breathe his last, he drew his sheet upon his face and when he felt uneasy, he uncovered his face and said in that very state: Let there be curse upon the Jews and the Christians that they have taken the graves of their apostles as places of worship. He in fact warned (his men) against what they (the Jews and the Christians) did.
Reference: Sahih Muslim 531
In-book reference: Book 5, Hadith 27
USC-MSA web (English) reference(deprecated numbering scheme): Book 4, Hadith 1082