Hadithcore
Sahih al-Bukhari, 1868
sahih

Narrated Anas:

The Prophet (ﷺ) came to Medina and ordered a mosque to be built and said, "O Bani Najjar! Suggest to me the price (of your land)." They said, "We do not want its price except from Allah" (i.e. they wished for a reward from Allah for giving up their land freely). So, the Prophet (ﷺ) ordered the graves of the pagans to be dug out and the land to be leveled, and the date-palm trees to be cut down. The cut datepalms were fixed in the direction of the Qibla of the mosque.

حَدَّثَنَا أَبُو مَعْمَرٍ، حَدَّثَنَا عَبْدُ الْوَارِثِ، عَنْ أَبِي التَّيَّاحِ، عَنْ أَنَسٍ ـ رضى الله عنه ـ قَدِمَ النَّبِيُّ صلى الله عليه وسلم الْمَدِينَةَ فَأَمَرَ بِبِنَاءِ الْمَسْجِدِ فَقَالَ ‏

‏ يَا بَنِي النَّجَّارِ ثَامِنُونِي ‏

‏‏.‏ فَقَالُوا لاَ نَطْلُبُ ثَمَنَهُ إِلاَّ إِلَى اللَّهِ‏.‏ فَأَمَرَ بِقُبُورِ الْمُشْرِكِينَ، فَنُبِشَتْ، ثُمَّ بِالْخِرَبِ فَسُوِّيَتْ، وَبِالنَّخْلِ فَقُطِعَ، فَصَفُّوا النَّخْلَ قِبْلَةَ الْمَسْجِدِ‏.‏

References2 variants
In-Book Reference
Book 29, Hadith 2
USC-MSA web (English) reference
Vol. 3, Book 30, Hadith 92 (deprecated numbering scheme)
Sharh · explanationclick to expand
Building a mosque was the first work the Messenger of Allah ﷺperformed after his arrival to Al-Madeenah. This was due to the great importance and significant role of mosques in Islam, being the houses of Allah on earth where prayers are established, and Allah’s remembrance is often mentioned. In this hadeeth, Anas ibn Maalik (may Allah be pleased with him)reports that when the Prophet ﷺ migrated from Makkah to Al-Madeenah, the homeland of Islam, he ﷺ commanded that a mosque be built. The land upon which the mosque would be built was originally an orchard owned by someone from the tribe of Al-Najjaar (the tribe to which the maternal uncles of the Prophet ﷺ belonged), of to the Ansaar. He ﷺ summoned them and asked them to estimate the price of their land,so that he could buy it and build the mosque on it. However, they refused to take money in return for the land and told him that they only aspired to the reward of Allah, The Exalted. As the land contained some graves that belonged to the polytheists, their graves were exhumed,since the dead bodies of disbelievers and polytheistsare not given thesanctity of the dead bodies of Muslims. There were also remains of demolished houses; thesewere leveled to the ground. As for the palm trees that were in the land, they were cut down to be used in building the mosque. The trunks of the cut date-palm trees were aligned so as to form the wall facing the Qiblah. The Prophet ﷺ cut down the date-palm trees shortly after his migration to al-Madeenah, whilethe prohibition of cutting the trees of Al-Madeenah - cited in Saheeh Al-Bukhaaree and Saheeh Muslim - was only after he ﷺ returned from Khaybar. It is also possible that the prohibition in this regard is limited to cutting down trees to cause corruption, whereas cutting them down for reform purposes (or good reasons) is not deemed prohibited. Another possibility is that the prohibition is confined to the trees that grow naturally rather than those planted by people. This hadeeth exhibits the virtues and merits of the tribe of Al-Najjaar who belong to the Ansaar. It is also deduced from the hadeeth that it is not allowed to perform prayers in a graveyard, even if it containss polytheists’ graves, because the prohibition in this regard blocks the way to taking graves as places of prayer. This is because over the course of time, people change, and thus it is feared that people might fall into Fitnah (of taking the graves as places or objects of worship). It is also inferred from this hadeeth that if the bodies buried in the graveyard are exhumed, and the bones of the dead are taken out, it is no longer considered a graveyard, and thus it is permissible to perform prayer therein. This hadeeth also serves as evidence on the permissibility of cutting date-palm and other trees for the public interest. From the other benefits that we can take from this hadeeth is encouraging people tobuild mosques in newly developedareas inhabited by Muslims..
Related hadiths9
Compare isnād across 9 related chains →