Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:7:153

But those who committed misdeeds and then repented after them and believed - indeed your Lord, thereafter, is Forgiving and Merciful.  

But those who commit evil deeds and repent, desist from them, thereafter and believe, in God — indeed your Lord thereafter, that is, after repentance, is truly Forgiving, Merciful’, towards them.
القرآن:٧:١٥٣

وَالَّذِينَ عَمِلُوا السَّيِّئَاتِ ثُمَّ تَابُوا مِنْ بَعْدِهَا وَآمَنُوا إِنَّ رَبَّكَ مِنْ بَعْدِهَا لَغَفُورٌ رَحِيمٌ  

{والذين عملوا السيَّئات ثم تابوا} رجعوا عنها {من بعدها وآمنوا} بالله {إن ربَّك من بعدها} أي التوبة {لغفور} لهم {رحيم} بهم.

See similar narrations below:

Collected by Qurʾān
quran:16:119

Then, indeed your Lord, to those who have done wrong out of ignorance and then repent after that and correct themselves - indeed, your Lord, thereafter, is Forgiving and Merciful.  

Then indeed your Lord — to those who did evil, associating others ˹with God˺, out of ignorance, and then repented, returned ˹to God’s way˺, after that and made amends, in their actions — indeed your Lord after that, that is, ˹after˺ that ignorance, or that repentance, is Forgiving, of them, Merciful, to them.
القرآن:١٦:١١٩

ثُمَّ إِنَّ رَبَّكَ لِلَّذِينَ عَمِلُوا السُّوءَ بِجَهَالَةٍ ثُمَّ تَابُوا مِنْ بَعْدِ ذَٰلِكَ وَأَصْلَحُوا إِنَّ رَبَّكَ مِنْ بَعْدِهَا لَغَفُورٌ رَحِيمٌ  

{ثم إن ربك للذين عملوا السوء} الشرك {بجهالة ثم تابوا} رجعوا {من بعد ذلك وأصلحوا} عملهم {إن ربك من بعدها} أي الجهالة أو التوبة {لغفور} لهم {رحيم} بهم.