Narrated Anas
While the Muslims were offering the Fajr prayer, Allah's Messenger (ﷺ) suddenly appeared before them by living the curtain of the dwelling place of `Aisha, looked towards the Muslims who were standing in rows. He smiled with pleasure. Abu Bakr started retreating to join the row on the assumption that the Prophet wanted to come out for the prayer. The Muslims intended to leave the prayer (and were on the verge of being put to trial), but the Prophet (ﷺ) beckoned them to complete their prayer and then he let the curtain fall. He died in the last hours of that day.