I heard the Prophet ﷺ say, five days before his death, "I declare before Allah that I have taken none of you as an intimate friend, for Allah the Exalted has taken me as His intimate friend, just as He took Ibrahim as an intimate friend. Were I to take anyone from my community as an intimate friend, I would have taken Abu Bakr. Beware, those who came before you used to take the graves of their prophets and righteous ones as places of worship. Beware, do not take graves as places of worship. I forbid you from doing so."
حدثنا أبو بكر بن أبي شيبة وإسحق بن إبراهيم واللفظ لأبي بكر قال إسحق أخبرنا وقال أبو بكر حدثنا زكرياء بن عدي عن عبيد الله بن عمرو عن زيد بن أبي أنيسة عن عمرو بن مرة عن عبد الله بن الحارث النجراني قال حدثني
سمعت النبي ﷺ قبل أن يموت بخمس وهو يقول إني أبرأ إلى الله أن يكون لي منكم خليل فإن الله تعالى قد اتخذني خليلا كما اتخذ إبراهيم خليلا ولو كنت متخذا من أمتي خليلا لاتخذت أبا بكر خليلا ألا وإن من كان قبلكم كانوا يتخذون قبور أنبيائهم وصالحيهم مساجد ألا فلا تتخذوا القبور مساجد إني أنهاكم عن ذلك
Muslim also reported the hadith of Zakariya bin Adi, from Ubaydullah bin Amr, from Zayd, from Amr bin Mura, from Abdullah bin Harith, who said, Jundab told me, I heard the Prophet, peace and blessings be upon him and his family, say, "If I were to take anyone as an intimate friend, I would have taken Abu Bakr as an intimate friend, but I disown before Allah having any intimate friend among you."He said that Abu Abdul-Raheem differed from him, reporting it from Humayd Harrani, from Hurayth, an unknown man, and the hadith is sahih through the narration of Ibn Saeed and Ibn Masud.
Ibn Hajar said in Nukat Ziraf, volume 2, page 443, after mentioning part of the hadith, "I say, Barqani mentioned that Abu Abdul-Raheem narrated it from Ubaydullah (1) bin Amr, from Zayd bin Abu Unaysa, and he said, from Amr bin Mura, from Jameel Najrani, from Jundab. Barqani said, I mentioned that to Daraqutni, and he said, The narration of Ubaydullah bin Amr from Zayd is closer to being correct." End of quote.