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:24:10

And if not for the favor of Allah upon you and His mercy... and because Allah is Accepting of repentance and Wise.  

And were it not for God’s bounty to you and His mercy, in shielding you ˹from being exposed˺ in such ˹situations˺, and that God is the Relenting, in His acceptance of repentance in such ˹situations˺ and otherwise, Wise, in the rulings He has given for this and other matters, that He might make clear the truth therein and hasten punishment for those deserving it.
القرآن:٢٤:١٠

وَلَوْلَا فَضْلُ اللَّهِ عَلَيْكُمْ وَرَحْمَتُهُ وَأَنَّ اللَّهَ تَوَّابٌ حَكِيمٌ  

{ولولا فضل الله عليكم ورحمته} بالستر في ذلك {وأن الله تواب} بقبوله التوبة في ذلك وغيره {حكيم} فيما حكم به في ذلك وغيره ليبين الحق في ذلك وعاجل بالعقوبة من يستحقها.

See similar narrations below:

Collected by Qurʾān
quran:24:20

And if it had not been for the favor of Allah upon you and His mercy... and because Allah is Kind and Merciful.  

And were it not for God’s bounty to you, O band ˹of accusers˺ and His mercy and that God is Gentle, Merciful, to you, He would have surely hastened to ˹bring about˺ your punishment.
القرآن:٢٤:٢٠

وَلَوْلَا فَضْلُ اللَّهِ عَلَيْكُمْ وَرَحْمَتُهُ وَأَنَّ اللَّهَ رَءُوفٌ رَحِيمٌ  

{ولولا فضل الله عليكم} أيها العصبة {ورحمته وأن الله رؤوف رحيم} بكم لعاجلكم بالعقوبة.