Abdullah bin Abbas reported,

As for the one about whom the Messenger of Allah ﷺ said, "Had I been to take a close friend from this nation, I would have taken him, but the bond of Islam is superior," or he said, "is better," he placed him in the position of a father, or he said, he regarded him as a father.

Bukhari 6738

Sahih

حدثنا أبو معمر حدثنا عبد الوارث حدثنا أيوب عن عكرمة

عن ابن عباس قال

أما الذي قال رسول الله ﷺ لو كنت متخذا من هذه الأمة خليلا لاتخذته ولكن خلة الإسلام أفضل أو قال خير فإنه أنزله أبا أو قال قضاه أبا

البخاري 6738صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Obligatory duties
Chapter
Inheritance of the grandfather with the father and brothers
Numbering
Darussalam 6738
Bukhari 6738