Abu Musa Ashari reported,

The Prophet ﷺ said, "When Allah عز وجل intends mercy for a nation among His servants, He takes the soul of their prophet before them, making him a forerunner and a predecessor preceding them. When He intends the destruction of a nation, He punishes it while its prophet is still alive and destroys it as he watches, comforting his eyes with their destruction since they had denied him and disobeyed his command."

Muslim 5965

Sahih

قال مسلم وحدثت عن أبي أسامة وممن روى ذلك عنه إبراهيم بن سعيد الجوهري حدثنا أبو أسامة حدثني بريد بن عبد الله عن أبي بردة

عن أبي موسى

عن النبي ﷺ قال إن الله عز وجل إذا أراد رحمة أمة من عباده قبض نبيها قبلها فجعله لها فرطا وسلفا بين يديها وإذا أراد هلكة أمة عذبها ونبيها حي فأهلكها وهو ينظر فأقر عينه بهلكتها حين كذبوه وعصوا أمره

مسلم 5965صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Virtues
Chapter
If Allah Most High wishes mercy for a nation, He takes its Prophet before it
Numbering
Darussalam 5965
Muslim 5965