It is narrated from Sayyiduna Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "You should not be hasty in praising anyone until you see how his end turns out. For sometimes a person who does deeds does righteous deeds for a long part of his life, or for a period of his time, such that if he died in that state he would enter Paradise; then he changes and begins doing evil deeds. And indeed a person spends a period of his life in evil deeds, such that if he died in that state he would enter Hell; then he changes and begins doing righteous deeds. And remember that when Allah Almighty intends good for a servant, He employs him (in good work) before his death." The Companions said: O Messenger of Allah! How does Allah employ him?! He (peace and blessings be upon him) said: "Allah Almighty grants him the ability to do a righteous deed before his death, and then takes his soul upon it." Imam Musaddad recorded this hadith as mawquf (the Companion's own words) with a sahih chain, while Abu Bakr bin Abi Shaybah, Abd bin Humayd, Imam Ahmad bin Hanbal, Abu Ya'la and al-Hakim recorded it as marfu' (the Prophet's words), and al-Hakim declared it sahih; their wordings are close to one another. Imam al-Tirmidhi recorded it in abridged form.