We prayed Maghrib with the Messenger of Allah ﷺ, then we said, "Why don't we stay until we pray Isha with him?" So we sat waiting.He came out to us and asked, "Are you still here?"We said, "Messenger of Allah, we prayed Maghrib with you, then we said we would sit until we pray Isha with you."He said, "You have done well," or, "You have done right."Then he raised his head to the sky, as he often did, and said, "The stars are a source of security for the sky. When the stars disappear, what has been promised will come to the sky. I am a source of security for my companions. When I am gone, what has been promised will come to my companions. And my companions are a source of security for my ummah. When my companions are gone, what has been promised will come to my ummah."
صلينا المغرب مع رسول الله ﷺ، ثم قلنا: لو جلسنا حتى نصلى معه العشاء، قال: فجلسنا، فخرج علينا، فقال: ما زلتم ها هنا؟ قلنا: يا رسول الله، صلينا معك المغرب، ثم قلنا: نجلس حتى نصلى معك العشاء. قال: أحسنتم أو أصبتم. قال: فرفع رأسه إلى السماء، وكان كثيرا مما يرفع رأسه إلى السماء، فقال: النجوم أمنة للسماء، فإذا ذهبت النجوم أتى السماء ما توعد، وأنا أمنة لأصحابي، فإذا ذهبت أتى أصحابي ما يوعدون، وأصحابي أمنة لأمتي، فإذا ذهب أصحابي أتى أمتي ما يوعدون.
Muslim narrated it in the Book of the Virtues of the Companions (2531) through several routes from Husayn bin Ali Jafi, from Mujammi bin Yahya, from Saeed bin Abu Burda, from Abu Burda, from his father, and he mentioned the hadith.His saying, "When the stars disappear," means when they darken and scatter.His saying, "I am a safeguard," with the letters vowelled as fathas, means a safeguard from the trials and wars.His saying, "My companions will encounter what they were promised," means the trials and wars that occurred during the lifetime of the companions.