2. Book of Ṣalāh

٢۔ كِتَابُ الصَّلَاةِ

2.120 [Machine] Prohibition of using graves as mosques

٢۔١٢٠ بَابُ: النَّهْيِ عَنِ اتِّخاذِ الْقُبُورِ مَسَاجِدَ

darimi:1443al-Ḥakam b. Nāfiʿ > Shuʿayb > al-Zuhrī > ʿUbaydullāh b. ʿAbdullāh > Ibn ʿAbbās And ʿĀʾishah

When the last moment of the life of Messenger of Allah ﷺ came he started putting his 'Khamisa' on his face and when he felt hot and short of breath he took it off his face and said, "May Allah curse the Jews and Christians for they built the places of worship at the graves of their Prophets." The Prophet ﷺ was warning (Muslims) of what those had done. (Using translation from Bukhārī 435)  

الدارمي:١٤٤٣أَخْبَرَنَا الْحَكَمُ بْنُ نَافِعٍ أَنْبَأَنَا شُعَيْبٌ عَنِ الزُّهْرِيِّ أَخْبَرَنِي عُبَيْدُ اللَّهِ بْنُ عَبْدِ اللَّهِ

أَنَّ ابْنَ عَبَّاسٍ وَعَائِشَةَ قَالَا لَمَّا نُزِلَ بِالنَّبِيِّ ﷺ طَفِقَ يَطْرَحُ خَمِيصَةً لَهُ عَلَى وَجْهِهِ فَإِذَا اغْتَمَّ كَشَفَهَا عَنْ وَجْهِهِ فَقَالَ وَهُوَ كَذَلِكَ «لَعْنَةُ اللَّهِ عَلَى الْيَهُودِ وَالنَّصَارَى؛ اتَّخَذُوا قُبُورَ أَنْبِيَائِهِمْ مَسَاجِدَ» يُحَذِّرُ مِثْلَ مَا صَنَعُوا