(6) باب مَنْ رَجَعَ الْقَهْقَرَى فِي صَلاَتِهِ، أَوْ تَقَدَّمَ بِأَمْرٍ يَنْزِلُ بِهِ
Narrated Anas bin Malik:
While Abu Bakr was leading the people in the morning prayer on a Monday, the Prophet (ﷺ) came towards them suddenly having lifted the curtain of 'Aisha's house, and looked at them as they were standing inrows and smiled. Abu Bakr tried to come back thinking that Allah's Apostle wanted to come out for the prayer. The attention of the Muslims was diverted from the prayer because they were delighted to see the Prophet. The Prophet (ﷺ) waved his hand to them to complete their prayer, then he went back into the room and let down the curtain. The Prophet expired on that very day.
Reference: Sahih al-Bukhari 1205
In-book reference: Book 21, Hadith 9
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 2, Book 22, Hadith 297