The Messenger of Allah ﷺ said, "Jibreel kept urging me to treat the neighbor well until I thought he would make him an heir."
حدثنا قتيبة حدثنا الليث بن سعد عن يحيى بن سعيد عن أبي بكر هو ابن محمد بن عمرو بن حزم عن عمرة
أن رسول الله ﷺ قال ما زال جبريل يوصيني بالجار حتى ظننت أنه سيورثه
Its authenticity is agreed upon. Muslim also related it in "Kindness and Maintaining Ties," the chapter on the recommendation to be kind to one's neighbor, no. 3624, from Qutayba, and Bukhari related it, no. 6014, through the hadith of Yahya bin Saeed Ansari, with the same chain.