Anas reported that a person came to Allah's Apostle (ﷺ) said:
Allah's Messenger, I have committed an offence which deserves imposition of haad, so impose it upon me according to the Book of Allah. Thereupon he said: Were you not present with us at the time of prayer? He said: Yes. Thereupon he said: You have been granted pardon.
Reported by Muslim (No. 2764) and Al-Bukhari (No. 6823).
إِنِّي أَصَبْتُ حَدًّا فَأَقِمْهُ عَلَىَّ. قَالَ وَلَمْ يَسْأَلْهُ عَنْهُ. قَالَ وَحَضَرَتِ الصَّلاَةُ فَصَلَّى مَعَ النَّبِيِّ صلى الله عليه وسلم فَلَمَّا قَضَى النَّبِيُّ صلى الله عليه وسلم الصَّلاَةَ قَامَ…
Narrated by Anas ibn Mālik
AuthenticMuttafaq ‘alayh (Bukhari and Muslim)Riyad as-Salihin 435
Anas (may Allah be pleased with him) reported: A man came to the Prophet (may Allah's peace and blessings be upon him) and said: "O Messenger of Allah, I committed a sin liable to a legal punishment, so inflict it upon me." As the time of the prayer came, he offered the prayer along with the…
" قال: نعم . قال: قد غفر لك"
Narrated by Anas ibn MālikExplained
AuthenticMuttafaq ‘alayh (Bukhari and Muslim)Mishkat al-Masabih 567