Sunan Ibn Majah – Hadith No : 742

It was narrated that Anas bin Malik said: “The location where the Prophet’s Mosque was built belonged to Banu Najjar. In it there were date-palm trees and graves of the idolaters. The Prophet said to them: ‘Name its price.’ They said: ‘We will never take any money for it.’ The Prophet built it and they were assisting him, and the Prophet was saying: ‘The real life is the life of the Hereafter so forgive the Ansar and the Muhajirah.’ Before the mosque was built, the Prophet would perform prayer wherever he was when the time for prayer came.”

Hadith In Arabic Text :

حدثنا علي بن محمد، حدثنا وكيع، عن حماد بن سلمة، عن أبي التياح الضبعي، عن أنس بن مالك، قال كان موضع مسجد النبي صلى الله عليه وسلم لبني النجار وكان فيه نخل ومقابر للمشركين فقال لهم النبي صلى الله عليه وسلم ‏”‏ ثامنوني به ‏”‏ ‏.‏ قالوا لا نأخذ له ثمنا أبدا ‏.‏ قال فكان النبي صلى الله عليه وسلم يبنيه وهم يناولونه والنبي صلى الله عليه وسلم يقول ‏”‏ ألا إن العيش عيش الآخرة فاغفر للأنصار والمهاجرة ‏”‏ ‏.‏ قال وكان النبي صلى الله عليه وسلم يصلي قبل أن يبني المسجد حيث أدركته الصلاة ‏.‏

Chapter : The Book On The Mosques And The Congregations – كتاب المساجد والجماعات