(83) بَابُ مَرَضِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَوَفَاتِهِ
Narrated Anas bin Malik:
While the Muslims were offering the Fajr prayer on Monday and Abu Bakr was leading them in prayer, suddenly Allah's Messenger (ﷺ) lifted the curtain of `Aisha's dwelling and looked at them while they were in the rows of the prayers and smiled. Abu Bakr retreated to join the row, thinking that Allah's Apostle wanted to come out for the prayer. The Muslims were about to be put to trial in their prayer (i.e. were about to give up praying) because of being overjoyed at seeing Allah's Messenger (ﷺ). But Allah's Apostle beckoned them with his hand to complete their prayer and then entered the dwelling and let fall the curtain.
Reference: Sahih al-Bukhari 4448
In-book reference: Book 64, Hadith 468
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 5, Book 59, Hadith 729