Language:
كتاب الأذان
10  
Call to Prayers (Adhaan)
(46)
Chapter: The religious learned men are entitled to precedence in leading the Salat (prayer)
(46)
باب أَهْلُ الْعِلْمِ وَالْفَضْلِ أَحَقُّ بِالإِمَامَةِ
Sahih al-Bukhari 680

Narrated Az-Zuhri:

Anas bin Malik Al-Ansari, told me, "Abu Bakr used to lead the people in prayer during the fatal illness of the Prophet (ﷺ) till it was Monday. When the people aligned (in rows) for the prayer the Prophet (ﷺ) lifted the curtain of his house and started looking at us and was standing at that time. His face was (glittering) like a page of the Qur'an and he smiled cheerfully. We were about to be put to trial for the pleasure of seeing the Prophet, Abu Bakr retreated to join the row as he thought that the Prophet (ﷺ) would lead the prayer. The Prophet (ﷺ) beckoned us to complete the prayer and he let the curtain fall. On the same day he died."

حَدَّثَنَا أَبُو الْيَمَانِ، قَالَ أَخْبَرَنَا شُعَيْبٌ، عَنِ الزُّهْرِيِّ، قَالَ أَخْبَرَنِي أَنَسُ بْنُ مَالِكٍ الأَنْصَارِيُّ ـ وَكَانَ تَبِعَ النَّبِيَّ صلى الله عليه وسلم وَخَدَمَهُ وَصَحِبَهُ أَنَّ أَبَا بَكْرٍ كَانَ يُصَلِّي لَهُمْ فِي وَجَعِ النَّبِيِّ صلى الله عليه وسلم الَّذِي تُوُفِّيَ فِيهِ، حَتَّى إِذَا كَانَ يَوْمُ الاِثْنَيْنِ وَهُمْ صُفُوفٌ فِي الصَّلاَةِ، فَكَشَفَ النَّبِيُّ صلى الله عليه وسلم سِتْرَ الْحُجْرَةِ يَنْظُرُ إِلَيْنَا، وَهْوَ قَائِمٌ كَأَنَّ وَجْهَهُ وَرَقَةُ مُصْحَفٍ، ثُمَّ تَبَسَّمَ يَضْحَكُ، فَهَمَمْنَا أَنْ نَفْتَتِنَ مِنَ الْفَرَحِ بِرُؤْيَةِ النَّبِيِّ صلى الله عليه وسلم، فَنَكَصَ أَبُو بَكْرٍ عَلَى عَقِبَيْهِ لِيَصِلَ الصَّفَّ، وَظَنَّ أَنَّ النَّبِيَّ صلى الله عليه وسلم خَارِجٌ إِلَى الصَّلاَةِ، فَأَشَارَ إِلَيْنَا النَّبِيُّ صلى الله عليه وسلم أَنْ أَتِمُّوا صَلاَتَكُمْ، وَأَرْخَى السِّتْرَ، فَتُوُفِّيَ مِنْ يَوْمِهِ‏.‏
Reference : Sahih al-Bukhari 680
In-book reference : Book 10, Hadith 74
USC-MSA web (English) reference : Vol. 1, Book 11, Hadith 648
  (deprecated numbering scheme)