← Sahih al-Bukhari
Sahih al-Bukhari · Hadith #3501 · Companions of the Prophet

Narrated Aiyub:

حَدَّثَنَا مُعَلَّى، وَمُوسَى، قَالاَ حَدَّثَنَا وُهَيْبٌ، عَنْ أَيُّوبَ، وَقَالَ، ‏ "‏ لَوْ كُنْتُ مُتَّخِذًا خَلِيلاً لاَتَّخَذْتُهُ خَلِيلاً، وَلَكِنْ أُخُوَّةُ الإِسْلاَمِ أَفْضَلُ ‏"‏‏.‏ حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا عَبْدُ الْوَهَّابِ، عَنْ أَيُّوبَ، مِثْلَهُ‏.‏

The Prophet (ﷺ) said, "If I were to take a Khalil, I would have taken him (i.e. Abu Bakr) as a Khalil, but
the Islamic brotherhood is better."