4:17
إِنَّمَا ٱلتَّوْبَةُ عَلَى ٱللَّهِ لِلَّذِينَ يَعْمَلُونَ ٱلسُّوٓءَ بِجَهَٰلَةٍۢ ثُمَّ يَتُوبُونَ مِن قَرِيبٍۢ فَأُو۟لَٰٓئِكَ يَتُوبُ ٱللَّهُ عَلَيْهِمْ ۗ وَكَانَ ٱللَّهُ عَلِيمًا حَكِيمًۭا
The repentance accepted by Allah is only for those who do wrong in ignorance [or carelessness] and then repent soon after. It is those to whom Allah will turn in forgiveness, and Allah is ever Knowing and Wise.
Translation · Saheeh International
Tafsir
Ibn Kathīr (abridged)
Repentance is Accepted Until one Faces death
Allah states that He accepts repentance of the servant who commits an error in ignorance and then repents, even just before he sees the angel who captures the soul, before his soul reaches his throat. Mujahid and others said, "Every person who disobeys Allah by mistake, or intentionally is ignorant, until he refrains from the sin." Qatadah said that Abu Al-`Aliyah narrated that the Companions of the Messenger of Allah ﷺ used to say, "Every sin that the servant commits, he commits out of ignorance." `Abdur-Razzaq narrated that, Ma`mar said that Qatadah said that, the Companions of the Messenger of Allah ﷺ agreed that every sin that is committed by intention or otherwise, is committed in ignorance." Ibn Jurayj said, "Abdullah bin Kathir narrated to me that Mujahid said, `Every person who disobeys Allah (even willfully), is ignorant while committing the act of disobedience."' Ibn Jurayj said, "`Ata' bin Abi Rabah told me something similar." Abu Salih said that Ibn `Abbas commented, "It is because of one's ignorance that he commits the error." `Ali bin Abi Talhah reported that Ibn `Abbas said about the Ayah,
ثُمَّ يَتُوبُونَ مِن قَرِيبٍ
(and repent soon (afterwards)), "Until just before he (or she) looks at the angel of death." Ad-Dahhak said, "Every thing before death is `soon afterwards."' Al-Hasan Al-Basri said about the Ayah,
ثُمَّ يَتُوبُونَ مِن قَرِيبٍ
(and repent soon afterwards), "Just before his last breath leaves his throat." `Ikrimah said, "All of this life is `soon afterwards."' Imam Ahmad recorded that Ibn `Umar said that the Messenger ﷺ said,