Ayah 4:17
النساء · An-Nisaa
إِنَّمَا ٱلتَّوْبَةُ عَلَى ٱللَّهِ لِلَّذِينَ يَعْمَلُونَ ٱلسُّوٓءَ بِجَهَـٰلَةٍ ثُمَّ يَتُوبُونَ مِن قَرِيبٍ فَأُو۟لَـٰٓئِكَ يَتُوبُ ٱللَّهُ عَلَيْهِمْ ۗ وَكَانَ ٱللَّهُ عَلِيمًا حَكِيمًا
(17) The repentance accepted by Allāh is only for those who do wrong in ignorance [or carelessness] and then repent soon [after].[172] It is those to whom Allāh will turn in forgiveness, and Allāh is ever Knowing and Wise.
[172]- Scholars have also interpreted "soon" to mean before death.