Sahih al-Bukhari, Hadith 3654

Narrated Abu Sa`id Al-Khudri: Allah's Messenger addressed the people saying, "Allah has given option to a slave to choose this world or what is with Him. The slave has chosen what is with Allah." Abu Bakr wept, and we were astonished at his weeping caused by what the Prophet mentioned as to a Slave ( of Allah) who had been offered a choice, (we learned later on) that Allah's Messenger himself was the person who was given the choice, and that Abu Bakr knew best of all of us. Allah's Messenger added, "The person who has favored me most of all both with his company and wealth, is Abu Bakr. If I were to take a Khalil other than my Lord, I would have taken Abu Bakr as such, but (what relates us) is the Islamic brotherhood and friendliness. All the gates of the Mosque should be closed except the gate of Abu Bakr."

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

sunnah.com