Sahih Muslim 2383 a
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لَوْ كُنْتُ مُتَّخِذًا خَلِيلاً لاَتَّخَذْتُ أَبَا بَكْرٍ خَلِيلاً وَلَكِنَّهُ أَخِي وَصَاحِبِي وَقَدِ اتَّخَذَ اللَّهُ عَزَّ وَجَلَّ صَاحِبَكُمْ خَلِيلاً "
Abdullah b. Mas'ud reported Allah's Messenger (ﷺ) as saying:
If I were to choose a bosom friend I would have definitely chosen Abu Bakr as my bosom friend, but he is my brother and my companion and Allah, the Exalted and Gliorious. has taken your brother and companion (meaning Prophet himself) as a friend.
Full reference and source
Sahih Muslim 2383 a In-book : Book 44, Hadith 4 USC-MSA web (English) : Book 31, Hadith 5871 (deprecated)
View source on Sunnah.com (opens in a new tab)