8. Ṣalāh (Ritual Prayer)

٨۔ كتاب الصلاة

8.48 Is it permissible to dig the graves of pagans of the period of Ignorance, and to use that place as a mosque?

٨۔٤٨ بَابُ هَلْ تُنْبَشُ قُبُورُ مُشْرِكِي الْجَاهِلِيَّةِ، وَيُتَّخَذُ مَكَانَهَا مَسَاجِدَ

[Machine] Translation: The Prophet ﷺ said, "May Allah curse the Jews; they took the graves of their prophets as places of worship." And there is no objection to praying near graves. Umar saw Anas ibn Malik praying near a grave and said, "The grave, the grave." But he did not command him to repeat the prayer.

لِقَوْلِ النَّبِيِّ ﷺ: «لَعَنَ اللَّهُ الْيَهُودَ، اتَّخَذُوا قُبُورَ أَنْبِيَائِهِمْ مَسَاجِدَ». وَمَا يُكْرَهُ مِنَ الصَّلاَةِ فِي الْقُبُورِ. وَرَأَى عُمَرُ أَنَسَ بْنَ مَالِكٍ يُصَلِّي عِنْدَ قَبْرٍ فَقَالَ الْقَبْرَ الْقَبْرَ. وَلَمْ يَأْمُرْهُ بِالإِعَادَةِ.

bukhari:427Muḥammad b. al-Muthanná > Yaḥyá > Hishām from my father > ʿĀʾishah

Um Habiba and Um Salama mentioned about a church they had seen in Ethiopia in which there were pictures. They told the Prophet ﷺ about it, on which he said, "If any religious man dies amongst those people they would build a place of worship at his grave and make these pictures in it. They will be the worst creature in the sight of Allah on the Day of Resurrection."  

البخاري:٤٢٧حَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى قَالَ حَدَّثَنَا يَحْيَى عَنْ هِشَامٍ قَالَ أَخْبَرَنِي أَبِي عَنْ عَائِشَةَ

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

bukhari:428Musaddad > ʿAbd al-Wārith > Abū al-Tayyāḥ > Anas

When the Prophet ﷺ arrived Medina he dismounted at ʿAwali-i-Medina amongst a tribe called Banu ʿAmr bin ʿAuf. He stayed there For fourteen nights. Then he sent for Bani An-Najjar and they came armed with their swords. As if I am looking (just now) as the Prophet ﷺ was sitting over his Rahila (Mount) with Abu Bakr riding behind him and all Banu An-Najjar around him till he dismounted at the courtyard of Abu Aiyub's house. The Prophet ﷺ loved to pray wherever the time for the prayer was due even at sheep-folds. Later on he ordered that a mosque should be built and sent for some people of Banu-An-Najjar and said, "O Banu An-Najjar! Suggest to me the price of this (walled) piece of land of yours." They replied, "No! By Allah! We do not demand its price except from Allah." Anas added: There were graves of pagans in it and some of it was unleveled and there were some date-palm trees in it. The Prophet ﷺ ordered that the graves of the pagans be dug out and the unleveled land be level led and the date-palm trees be cut down . (So all that was done). They aligned these cut date-palm trees towards the Qibla of the mosque (as a wall) and they also built two stone side-walls (of the mosque). His companions brought the stones while reciting some poetic verses. The Prophet ﷺ was with them and he kept on saying, "There is no goodness except that of the Hereafter, O Allah! So please forgive the Ansars and the emigrants. "  

البخاري:٤٢٨حَدَّثَنَا مُسَدَّدٌ قَالَ حَدَّثَنَا عَبْدُ الْوَارِثِ عَنْ أَبِي التَّيَّاحِ عَنْ أَنَسٍ قَالَ

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