Anas bin Malik reported,

The site of the Prophet's ﷺ mosque belonged to the tribe of Banu Najjar. On it stood date palms, ruined buildings, and graves from the days of pre-Islamic ignorance. The Messenger of Allah ﷺ said to them, "Name me a price for it."They replied, "We seek no price for it except from Allah عز وجل."So the Messenger of Allah ﷺ gave orders, and the date palms were cut down, the ruins cleared away, and the graves dug up. Before that, the Messenger of Allah ﷺ would pray in sheep pens wherever the time of prayer found him.

Ahmad 12242

Sahih

حدثنا يزيد أخبرنا حماد بن سلمة عن أبي التياح

عن أنس بن مالك قال

كان موضع مسجد النبي ﷺ لبني النجار وكان فيه نخل وخرب وقبور من قبور الجاهلية فقال لهم رسول الله ﷺ ثامنوني فقالوا لا نبغي به ثمنا إلا عند الله عز وجل فأمر رسول الله ﷺ بالنخل فقطع وبالحرث فأفسد وبالقبور فنبشت وكان رسول الله ﷺ قبل ذلك يصلي في مرابض الغنم حيث أدركته الصلاة

أحمد 12242صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Anas bin Malik
Numbering
Darussalam 12242
Ahmad 12242