Abu Bakr was leading them in prayer during the illness from which the Messenger of Allah ﷺ passed away. Then on Monday, while they were standing in rows for the prayer, the Messenger of Allah ﷺ drew aside the curtain of the chamber and looked at us while standing, his face like a page of the Quran. Then the Messenger of Allah ﷺ smiled, laughing.We were nearly distracted in our prayer out of joy at the appearance of the Messenger of Allah ﷺ. Abu Bakr stepped back on his heels to join the row, thinking that the Messenger of Allah ﷺ was coming out to pray. But the Messenger of Allah ﷺ gestured to them with his hand to complete their prayer.Then the Messenger of Allah ﷺ went back inside and let down the curtain, and the Messenger of Allah ﷺ passed away that very day.
إن أبا بكر كان يصلي لهم في وجع رسول الله ﷺ الذي توفي فيه. حتى إذا كان يوم الاثنين وهم صفوف في الصلاة. كشف رسول الله ﷺ ستر الحجرة. فنظر إلينا وهو قائم كأن وجهه ورقة مصحف. ثم تبسم رسول الله ﷺ ضاحكا، قال: فيهتنا ونحن في الصلاة من فرح بخروج رسول الله ﷺ. ونكص أبو بكر على عقبيه ليصل الصف. وظن أن رسول الله ﷺ خارج للصلاة. فأشار إليهم رسول الله ﷺ بيده أن أتموا صلاتكم. قال: ثم دخل رسول الله ﷺ فأرخى الستر. قال: فتوفي رسول الله ﷺ من يومه ذلك.
Bukhari related it in the Book of Adhan (754) and in other places, through several routes from Ibn Shihab, who said, Anas told me, and he mentioned it. Muslim related it in the Book of Prayer (419) through several routes from Yaqub bin Ibrahim bin Saad, from his father, from Salih, from Ibn Shihab, with this wording. Muslim said, "The hadith of Salih is more complete and fuller."