Sahih Muslim Book 030, Hadith Number 5679.
Hadith Section/Book: Sahih Muslim Sahih Muslim Book 30. The Excellent Qualities Of The Holy Prophet (PBUH) And His Companions
Chapter : When Allah the Exalted intends to show mercy to an Umma His Prophet is called back to his eternal home when the Umma is safe from the wrath of God.
Abu Musa reported Allah's Messenger (may peace be upon him) as saying: When Allah, the Exalted and Glorious, intends to show mercy to an Umma from amongst His servants He calls back His Apostle to his eternal home and makes him a harbinger and recompense in the world to come; and when He intends to cause destruction to an Umma, He punishes it while its Apostle is alive and He destroys it as he (the Apostle) witnesses it and he cools his eyes by destruction as they had belied him and disobeyed his command.