It was narrated that Anas bbin Malik said: "The location where the Prophet's Masjid was built belonged to Banu Najjar. In it there were date-palm trees and graves of the idolaters. The Prophet P.B.U.H said to them: 'Name its price: They said: 'We will never take any money for it: The Prophet P.B.U.H built it and they were assisting him, and the Prophet P.B.U.H was saying: 'The real life is the life of the Hereafter so forgive the Ansar and the Muhajirah: Before the Masjid was built, the Prophet P.B.U.H would perform prayer wherever he was when the time for prayer came." (Sahih)