Anas bin Malik reported,

Those who followed the Prophet ﷺ, served him, and accompanied him reported that Abu Bakr was leading them in prayer during the illness in which the Prophet ﷺ passed away. On Monday, while they were standing in rows for the prayer, the Prophet ﷺ drew back the curtain of his chamber and looked out at us, standing upright, his face like a page of the Quran. Then he smiled, almost laughing. We nearly broke our concentration out of joy at seeing the Prophet ﷺ. Abu Bakr stepped back on his heels to join the row, thinking the Prophet ﷺ was coming out to lead the prayer. But the Prophet ﷺ gestured to us to complete our prayer and let down the curtain. He passed away that same day.

Bukhari 680

Sahih

حدثنا أبو اليمان قال أخبرنا شعيب عن الزهري قال أخبرني

أنس بن مالك الأنصاري

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

البخاري 680صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Adhan
Chapter
People of knowledge and virtue are more deserving of leading prayer
Numbering
Darussalam 680
Bukhari 680