Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:1868Abū Maʿmar > ʿAbd al-Wārith > Abū al-Tayyāḥ > 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.  

البخاري:١٨٦٨حَدَّثَنَا أَبُو مَعْمَرٍ حَدَّثَنَا عَبْدُ الْوَارِثِ عَنْ أَبِي التَّيَّاحِ

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