Sahih Muslim 166
It is narrated from Hazrat Ibn Abbas (ra) that some people among the idolaters had committed killings, and many killings, and had committed adultery, and much adultery. Then they came to Muhammad (saw) and said: What you say and what you invite to is very good, and tell us whether there is an atonement for the deeds we have done. At this this verse was revealed: “wal-ladhina la yad'una ma'allahi...”: “And those who call not on any other god along with Allah, nor kill a person that Allah has forbidden except for just cause, nor commit adultery (or fornication), and he who does that shall meet with the punishment of sin.” (Qur’an 25:69) And this verse was revealed: “O My servants who have committed excesses against their own souls! despair not of the mercy of Allah.” (Qur’an 39:54)
AI-translated by Islam-Today