Allah the Exalted said:
١٢ - باب الحث على الازدياد من الخير في أواخر العمر
Allah the Exalted said:
And they will cry out therein, "Our Lord, remove us;1 we will do righteousness - other than what we were doing!" But did We not grant you life enough for whoever would remember therein to remember, and the warner had come to you? So taste [the punishment], for there is not for the wrongdoers any helper.
Ibn ʿAbbās and the verifying scholars said: its meaning is, "Did We not grant you a life long enough [to take heed], sixty years?" This is supported by the hadith we shall mention, if Allah the Exalted wills. It is also said: its meaning is eighteen years; and it is said: forty years — this was said by al-Ḥasan, al-Kalbī, and Masrūq, and it was also related from Ibn ʿAbbās. And they related that the people of Medina, when one of them reached forty years, would devote themselves entirely to worship. And it is said: it refers to the age of maturity. And His saying, the Exalted:
And they will cry out therein, "Our Lord, remove us;1 we will do righteousness - other than what we were doing!" But did We not grant you life enough for whoever would remember therein to remember, and the warner had come to you? So taste [the punishment], for there is not for the wrongdoers any helper.
Ibn ʿAbbās and the majority of scholars said: it [the warner] is the Prophet ﷺ. And it is said: it is grey hair [of old age] — this was said by ʿIkrimah, Ibn ʿUyaynah, and others besides them. And Allah knows best.
As for the hadiths:
The first: From Abū Hurayrah (may Allah be pleased with him), from the Prophet ﷺ, who said: "Allah has left no excuse to a person whose life He has prolonged until he reaches sixty years of age." Narrated by al-Bukhārī. The scholars said: its meaning is that He has left him no excuse, since He granted him respite for this length of time. It is said: "the man has left no room for excuse" when he reaches the utmost limit in [removing all] excuse.
The second: From Ibn ʿAbbās (may Allah be pleased with them both), who said: ʿUmar (may Allah be pleased with him) used to admit me [into his council] along with the elders of Badr. It was as though some of them felt resentment within themselves, and one said: "Why does this [young man] enter with us when we have sons like him?" ʿUmar said: "He is from those [whose merit] you know." Then one day he summoned me and admitted me along with them, and I did not think he had summoned me that day except to show them [my knowledge]. He said: "What do you say concerning the saying of Allah: 'When the help of Allah and the victory comes'? [al-Fatḥ: 1]" Some of them said: "We have been commanded to praise Allah and seek His forgiveness when He grants us help and victory." Others remained silent and said nothing. Then he said to me: "Is that what you say, O Ibn ʿAbbās?" I said: "No." He said: "Then what do you say?" I said: "It is [a notice of] the appointed term of the Messenger of Allah ﷺ, which Allah made known to him. He said: 'When the help of Allah and the victory comes' — and that is the sign of your appointed term — 'then glorify the praise of your Lord and seek His forgiveness; indeed He is ever-Accepting of repentance.'" So ʿUmar (may Allah be pleased with him) said: "I know nothing of it except what you say." Narrated by al-Bukhārī.
The third: From ʿĀʾishah (may Allah be pleased with her), who said: The Messenger of Allah ﷺ did not perform any prayer, after "When the help of Allah and the victory comes" was revealed to him, without saying in it: "Glory be to You, our Lord, and praise be to You; O Allah, forgive me." Agreed upon. In a narration in the two Ṣaḥīḥs from her: The Messenger of Allah ﷺ would frequently say in his bowing and his prostration: "Glory be to You, O Allah, our Lord, and praise be to You; O Allah, forgive me," thereby applying the Qurʾān. The meaning of "applying the Qurʾān" is that he was acting upon what he had been commanded to do in the Qurʾān, in His saying, the Exalted: "Then glorify the praise of your Lord and seek His forgiveness." And in a narration of Muslim: The Messenger of Allah ﷺ would frequently say before his death: "Glory be to You, O Allah, and praise be to You; I seek Your forgiveness and turn to You in repentance." ʿĀʾishah said: I said: "O Messenger of Allah, what are these words I see you have newly begun to say?" He said: "A sign has been appointed for me in my nation; when I see it, I say them: 'When the help of Allah and the victory comes' ... to the end of the sūrah." And in another narration of his: The Messenger of Allah ﷺ would frequently say: "Glory be to Allah and praise be to Him; I seek Allah's forgiveness and turn to Him in repentance." She said: I said: "O Messenger of Allah, I see you frequently saying, 'Glory be to Allah and praise be to Him; I seek Allah's forgiveness and turn to Him in repentance.'" He said: "My Lord informed me that I would see a sign in my nation, and that when I saw it I should frequently say: 'Glory be to Allah and praise be to Him; I seek Allah's forgiveness and turn to Him in repentance.' And I have indeed seen it: 'When the help of Allah and the victory comes' — the conquest of Mecca — 'and you see the people entering into the religion of Allah in throngs, then glorify the praise of your Lord and seek His forgiveness; indeed He is ever-Accepting of repentance.'"
The fourth: From Anas (may Allah be pleased with him), who said: Indeed Allah, Mighty and Majestic, sent down revelation in close succession upon the Messenger of Allah ﷺ before his death, until he passed away at the time when revelation was most abundant. Agreed upon.
The fifth: From Jābir (may Allah be pleased with him), who said: The Messenger of Allah ﷺ said: "Every servant will be raised up [on the Day of Resurrection] in the state in which he died." Narrated by Muslim.