"The Prophet ﷺ became sick and when his disease became aggravated, he said, "Tell Abu Bakr to lead the prayer." ʿAisha said, "He is a softhearted man and would not be able to lead the prayer in your place." The Prophet ﷺ said again, "Tell Abu Bakr to lead the people in prayer." She repeated the same reply but he said, "Tell Abu Bakr to lead the people in prayer. You are the companions of Joseph." So the messenger went to Abu Bakr (with that order) and he led the people in prayer in the lifetime of the Prophet.
مَرِضَ النَّبِيُّ ﷺ فَاشْتَدَّ مَرَضُهُ فَقَالَ مُرُوا أَبَا بَكْرٍ فَلْيُصَلِّ بِالنَّاسِ قَالَتْ عَائِشَةُ إِنَّهُ رَجُلٌ رَقِيقٌ إِذَا قَامَ مَقَامَكَ لَمْ يَسْتَطِعْ أَنْ يُصَلِّيَ بِالنَّاسِ قَالَ مُرُوا أَبَا بَكْرٍ فَلْيُصَلِّ بِالنَّاسِ فَعَادَتْ فَقَالَ مُرِي أَبَا بَكْرٍ فَلْيُصَلِّ بِالنَّاسِ فَإِنَّكُنَّ صَوَاحِبُ يُوسُفَ فَأَتَاهُ الرَّسُولُ فَصَلَّى بِالنَّاسِ فِي حَيَاةِ النَّبِيِّ ﷺ