(5) باب قَوْلِ النَّبِيِّ صلى الله عليه وسلم " لَوْ كُنْتُ مُتَّخِذًا خَلِيلاً " قَالَهُ أَبُو سَعِيدٍ
Narrated Ibn `Abbas:
While I was standing amongst the people who were invoking Allah for `Umar bin Al-Khattab who was lying (dead) on his bed, a man behind me rested his elbows on my shoulder and said, "(O `Umar!) May Allah bestow His Mercy on you. I always hoped that Allah will keep you with your two companions, for I often heard Allah's Messenger (ﷺ) saying, "I, Abu Bakr and `Umar were (somewhere). I, Abu Bakr and `Umar did (something). I, Abu Bakr and `Umar set out.' So I hoped that Allah will keep you with both of them." I turned back to see that the speaker was `Ali bin Abi Talib.
Reference: Sahih al-Bukhari 3677
In-book reference: Book 62, Hadith 27
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 5, Book 57, Hadith 26