Narrated 'Ubadah bin As-Samit:
We were with the Prophet (ﷺ) [in a gathering] and he said: 'Pledge to me that you will not associate [anything as] partners with Allah, and that you will not steal nor commit adultery.' He recited to them the Ayah. (And he said:)'Whoever among you dies, then this reward is with Allah, and whoever among you does some of this and then he is punished, it is atonement for him. And whoever does some of this and Allah covers it for him, then it is up to Allah; if He wills, He will punish them, and if He wills, He will forgive him.'