Hadithcore
Hadith #2111020

Narrated Anas bin Malik (RA):

Allah's Messenger (ﷺ) said: "The neighbor of the house has the most right to buy it." [Reported by an-Nasa'i. Ibn Hibban graded it Sahih (authentic), but it (this chain from Qatada from Anas) has a defect].

وَعَنْ أَنَسِ بْنِ مَالِكٍ ‏- رضى الله عنه ‏- قَالَ: قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-{ جَارُ اَلدَّارِ أَحَقُّ بِالدَّارِ } رَوَاهُ النَّسَائِيُّ, وَصَحَّحَهُ اِبْنُ حِبَّانَ, وَلَهُ عِلَّةٌ [1]‏ .‏

References2 variants
Sunnah.com reference
Book 7, Hadith 150
Arabic/English book reference
Book 7, Hadith 906