A group of people had killed many, fornicated extensively, and committed grave violations. They came to the Prophet ﷺ and said, "Muhammad, what you say and call to is indeed beautiful. If only you could tell us that there is some atonement for what we have done."So Allah revealed, "And those who do not invoke another god alongside Allah," up to His saying, "For them Allah will replace their evil deeds with good ones" [Furqan 25:68–70].He said, "Allah will replace their polytheism with faith, and their fornication with chastity."And the verse was revealed, "Say, My servants who have transgressed against themselves..." [Zumar 39:53].
أخبرنا حاجب بن سليمان المنبجي قال حدثنا ابن أبي رواد قال حدثنا ابن جريج عن عبد الأعلى الثعلبي عن سعيد بن جبير
أن قوما كانوا قتلوا فأكثروا وزنوا فأكثروا وانتهكوا فأتوا النبي ﷺ قالوا يا محمد إن الذي تقول وتدعو إليه لحسن لو تخبرنا أن لما عملنا كفارة فأنزل الله عز وجل {والذين لا يدعون مع الله إلها آخر} إلى {فأولئك يبدل الله سيئاتهم حسنات} قال يبدل الله شركهم إيمانا وزناهم إحصانا ونزلت {قل يا عبادي الذين أسرفوا على أنفسهم} الآية
Sourcing, [hasan], and it is found in Sunan al-Kubra, hadith no. 3466. Ibn Jurayj is known to obscure his chains of transmission, as Nasai stated in Siyar Alam al-Nubala (747), and he narrated it using "an." Abdul-Ala al-Thalabi was mentioned earlier, hadith no. 2011, and the hadith that follows serves as a corroborating witness for it. Abdul-Majid bin Abdul-Aziz bin Abu Rawwad-