Question
As-salamu alaykum wa rahmatullahi wa barakatuh
In a mosque, because of the large number of worshippers, the prayer space had become cramped. A privately owned piece of land adjoining the mosque, which contained a few old graves, was endowed for the mosque by its owners. Moreover, out of necessity, when there was no land at all on any side of the mosque for prayer, if in such a situation the mosque was extended onto the above-mentioned land, then, taking these reasons into consideration, is it correct to pray without disliking in this mosque, which has been built over graves, or not? بينوا توجروا
Answer
Building a mosque over the graves of the people of Islam is not permissible under any circumstances, because it cannot be free of two situations: either the graves are levelled and a mosque is built over them, or the bones are taken out and thrown away. Both of these situations are forbidden, and a curse is reported in the hadith upon those who build mosques over graves. Sitting on the grave of a Muslim, praying towards it or on it, is also forbidden. In the case of a mosque, these matters are unavoidable. Even leaning on the grave of a Muslim is forbidden, and breaking his bones and throwing them away is also forbidden. In short, respect for a Muslim is obligatory in every way. The evidences are as follows:
قَال رَسُوْلَ اللّٰهِ صلى الله عليه وسلم: «لَعَنَ اللّٰهُ الْيَهُوْدَ وَالنَّصَارَي اتََّخَذُوْا قُبُوْراً نْبِيَآئِهِمْ مساجدا»
قَالَ رَسُوْلُ اللّٰهِ صلى الله عليه وسلم: «لَا تُصَلُّوْا اِلَي الْقُبُوْرِ وَلَا تَجْلِسُوْا عَلَيْها»
وَفِيْ رَوَايَة الطَّبْرَانِيْ الْكَبِيْرِ لَا تُصَلُّوْا اِلٰي قَبْرٍا وَلَا عَلٰي قَبْرٍ انتهيٰ وَفِيْ رَوَايَة السُّنَنِ اِلَّا ابْنِ مَاجَة لَعَنَ رَسُوْلُ اللّٰهِ صلى الله عليه وسلم وَزَائِرَاتِ الْقُبُوْرِ وَالْمُتَّخِذِيْنَ عَلَيْهَا الْمَسَاجِدَ وَالسُّرُجَ انتهيٰ وَعَنْ عَمْرو بْنِ حَزْمٍ قَالَ رَاٰنِيْ النَّبِيُّ صلى الله عليه وسلم مُتَّكِاً عَلٰي قَبْرٍ فَقَالَ لَا تُوْذِ صَاحَبَ هٰذَا الْقَبْرِ انتهٰي رَوَاهُ اَحْمَدُ بِسَنَدٍ صَحِيْحٍ وَقَالَ رَسُوْلُ اللّٰهِ صلى الله عليه وسلم كَسْرُ عَظْمِ الْمَيَّتِ كَكَسْرِهٖ حَيًّا رَوَاهُ اَبُوْ دَاؤدَ بِاِسْنَادٍ عَلٰي شَرطٍ مُسْلِمٍ وَّزَادَ ابْنُ مَاجَةَ مِنْ حَدِيْثِ اُمِّ سَلَمَّة فِي الْاِثْمِ انتهيٰ
As for the old graves, if they belong to a general graveyard, then they are not the property of anyone; and if they are the graves of a particular people, then by the ruling of the above-mentioned evidences they too cannot be used for building a mosque. Yes, after taking out the bones of a non-Muslim’s grave, a mosque can be built, but not in the case of a Muslim’s. If no other land can be found on any side, then consider a larger mosque in another place; if that is not possible, then be content with what is there, but do not do anything contrary to the Shari’ah. If, hypothetically, even after this land is added, the worshippers increase further, then whatever arrangement they would make at that time, let them make the same now. هذا ما عندي واللّٰه أعلم وعلمه أتم وأحكم.