Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tabarani:16200cYaḥyá b. Ayyūb al-ʿAllāf al-Miṣrī > Saʿīd b. Abū Maryam > Yaḥyá b. Ayyūb > ʿUbaydullāh b. Zaḥr > ʿAlī b. Yazīd > al-Qāsim > Abū Umāmah > Kaʿb b. Mālik al-Anṣārī > ʿAhdī Binabiyyikum ﷺ Qabl And Fātih Likhams Layāl Fasamiʿtuh

[Machine] "My covenant with your Prophet, ﷺ , before his death was for five nights, and I heard him saying, 'There was no prophet unless he had a close companion in his nation, and indeed my close companion is Abu Bakr bin Abi Quhafa, and indeed Allah has taken your companion as a close friend.'"  

الطبراني:١٦٢٠٠cحَدَّثَنَا يَحْيَى بْنُ أَيُّوبَ الْعَلَّافُ الْمِصْرِيُّ ثنا سَعِيدُ بْنُ أَبِي مَرْيَمَ ثنا يَحْيَى بْنُ أَيُّوبَ حَدَّثَنِي عُبَيْدُ اللهِ بْنُ زَحْرٍ عَنْ عَلِيِّ بْنِ يَزِيدَ عَنِ الْقَاسِمِ عَنْ أَبِي أُمَامَةَ عَنْ كَعْبِ بْنِ مَالِكٍ الْأَنْصَارِيِّ قَالَ

عَهْدِي بِنَبِيِّكُمْ ﷺ قَبْلَ وَفَاتِهِ لِخَمْسِ لَيَالٍ فَسَمِعْتُهُ يَقُولُ «لَمْ يَكُنْ مِنْ نَبِيٍّ إِلَّا وَلَهُ خَلِيلٌ فِي أُمَّتِهِ وَإِنَّ خَلِيلِي أَبُو بَكْرِ بْنُ أَبِي قُحَافَةَ وَإِنَّ اللهَ ﷻ اتَّخَذَ صَاحِبَكُمْ خَلِيلًا»  


See similar narrations below:

Collected by Aḥmad
ahmad:3880ʿAbd al-Razzāq > Sufyān > al-Aʿmash > ʿAbdullāh b. Murrah > Abū al-Aḥwaṣ > ʿAbdullāh

that the Messenger of Allah ﷺ said: "I free myself of the friendship of every Khalil, and if I were to take a Khalil then I would have taken Ibn Abi Quhafah as a Khalil. And indeed your companion is Allah's Khalil." (Using translation from Tirmidhī 3655)  

أحمد:٣٨٨٠حَدَّثَنَا عَبْدُ الرَّزَّاقِ أَخْبَرَنَا سُفْيَانُ عَنِ الْأَعْمَشِ عَنْ عَبْدِ اللهِ بْنِ مُرَّةَ عَنْ أَبِي الْأَحْوَصِ قَالَ قَالَ عَبْدُ اللهِ

قَالَ رَسُولُ اللهِ ﷺ إِنِّي أَبْرَأُ إِلَى كُلِّ خَلِيلٍ مِنْ خِلِّهِ وَلَوْ كُنْتُ مُتَّخِذًا خَلِيلًا لَاتَّخَذْتُ ابْنَ أَبِي قُحَافَةَخَلِيلًا وَإِنَّ صَاحِبَكُمْ خَلِيلُ اللهِ ﷻ