Abu Musa Ashari reported,

The Messenger of Allah ﷺ fell ill, and his illness grew severe. He said, "Tell Abu Bakr to lead the people in prayer."Ayesha said, "Messenger of Allah, Abu Bakr is a soft-hearted man. Whenever he stands in your place, he will not be able to lead the people in prayer."He said, "Tell Abu Bakr to lead the people in prayer. You women are like the companions of Yusuf."So Abu Bakr led them in prayer during the lifetime of the Messenger of Allah ﷺ.

Muslim 948

Sahih

حدثنا أبو بكر بن أبي شيبة حدثنا حسين بن علي عن زائدة عن عبد الملك بن عمير عن أبي بردة

عن أبي موسى قال

مرض رسول الله ﷺ فاشتد مرضه فقال مروا أبا بكر فليصل بالناس فقالت عائشة يا رسول الله إن أبا بكر رجل رقيق متى يقم مقامك لا يستطع أن يصلي بالناس فقال مري أبا بكر فليصل بالناس فإنكن صواحب يوسف قال فصلى بهم أبو بكر حياة رسول الله ﷺ

مسلم 948صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Prayer
Chapter
Appointing a deputy by the imam when he has an excuse such as illness, travel, or other reasons to lead the people in prayer, and that whoever prays behind an imam who is sitting due to inability to stand must stand if he is able, and the abrogation of sitting behind a sitting imam for those capable of standing
Numbering
Darussalam 948
Muslim 948