It is narrated from Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) that he said: "Whoever repents a year before his death, his repentance is accepted; whoever repents a month before his death, his repentance is accepted; whoever repents a week before his death, his repentance is accepted; whoever repents a day before his death, his repentance is accepted; and whoever repents an hour before his death, his repentance is accepted." The narrator said: I said to him: But Allah, the Mighty and Majestic, has said: "Repentance accepted by Allah is only for those who do evil in ignorance" (to the end of the verse). At this Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) said: "I am only telling you as I heard it from the Messenger of Allah (peace and blessings be upon him)." Abu Dawud al-Tayalisi, Ahmad bin Hanbal and Abu Ya'la recorded it, and in the chain of each of them there is a narrator who is not named. Also Abu Bakr bin Abi Shaybah recorded it as mawquf with a connected chain, with the wording that Sayyiduna Abdullah bin Amr (may Allah be pleased with them both) was asked: Does Allah Almighty accept repentance from every sin? He replied: "Yes." And Imam al-Hakim recorded it with a connected chain, with the wording that one of the Companions of the Messenger of Allah (peace and blessings be upon him) said: I heard the Messenger of Allah (peace and blessings be upon him) saying: "Whoever repents to Allah before he dies, Allah accepts his repentance." The narrator said: I narrated this hadith to another Companion of the Prophet (peace and blessings be upon him), and he asked: Did you hear this yourself? I said: Yes. So he said: I bear witness that I heard the Messenger of Allah (peace and blessings be upon him) saying: "Whoever turns to Allah half a day before his death, Allah accepts his repentance." Then I told this to another Companion of the Messenger of Allah (peace and blessings be upon him), and he asked: Did you hear it yourself? I said: Yes. So he said: I bear witness that I heard the Messenger of Allah (peace and blessings be upon him) saying: "Whoever repents a forenoon's time before his death, Allah accepts his repentance." Then I mentioned this to another Companion of the Messenger of Allah (peace and blessings be upon him), and he asked: Did you hear this yourself? I said: Yes. So he said: I bear witness that I heard the Messenger of Allah (peace and blessings be upon him) saying: "Whoever repents to Allah before the throes of death, when the soul reaches the throat, Allah accepts his repentance."
Hadith Takhrij«رواه أبو داود الطيالسي ، وأحمد بن حنبل ، وأبو يعلى، كلهم بسند فيه راو لم يسم» «أخرجه مسند أحمد برقم: 6881، 22559، وأخرجه مجمع الزوائد ومنبع الفوائد برقم: 17503، 17505، وأخرجه المستدرك على الصحيحين برقم: 7735»