Sahih Muslim , Book 17, Hadith 4202 (USC-MSA)

Abu Sa'id reported that a person belonging to the clan of Aslam, who was called Ma, iz b. Malik, came to Allah's Messenger and said: I have committed immorality (adultery), so inflict punishment upon me. Allah's Apostle turned him away again and again. He then asked his people (about the state of his mind). They said: We do not know of any ailment of his except that he has committed something about which he thinks that he would not be able to relieve himself of its burden but with the Hadd being imposed upon him. He (Ma'iz) came back to Allah's Apostle and he commanded us to stone him. We took him to the Baqi' al-Gharqad (the graveyard of Medina). We neither tied him nor dug any ditch for him. We attacked him with bones, with clods and pebbles. He ran away and we ran after him until he came upon the ston ground (al-Harra) and stopped there and we stoned him with heavy stones of the Harra until he became motionless (lie died). He (the Holy Prophet) then addressed (us) in the evening saying Whenever we set forth on an expedition in the cause of Allah, some one of those connected with us shrieked (under the pressure of sexual lust) as the bleating of a male goat. It is essential that if a person having committed such a deed is brought to me, I should punish him. He neither begged forgiveness for him nor cursed him.

حَدَّثَنِي مُحَمَّدُ بْنُ الْمُثَنَّى، حَدَّثَنِي عَبْدُ الأَعْلَى، حَدَّثَنَا دَاوُدُ، عَنْ أَبِي نَضْرَةَ، عَنْ أَبِي، سَعِيدٍ أَنَّ رَجُلاً، مِنْ أَسْلَمَ يُقَالُ لَهُ مَاعِزُ بْنُ مَالِكٍ أَتَى رَسُولَ اللَّهِ صلى الله عليه وسلم فَقَالَ إِنِّي أَصَبْتُ فَاحِشَةً فَأَقِمْهُ عَلَىَّ ‏.‏ فَرَدَّهُ النَّبِيُّ صلى الله عليه وسلم مِرَارًا قَالَ ثُمَّ سَأَلَ قَوْمَهُ فَقَالُوا مَا نَعْلَمُ بِهِ بَأْسًا إِلاَّ أَنَّهُ أَصَابَ شَيْئًا يَرَى أَنَّهُ لاَ يُخْرِجُهُ مِنْهُ إِلاَّ أَنْ يُقَامَ فِيهِ الْحَدُّ - قَالَ - فَرَجَعَ إِلَى النَّبِيِّ صلى الله عليه وسلم فَأَمَرَنَا أَنْ نَرْجُمَهُ - قَالَ - فَانْطَلَقْنَا بِهِ إِلَى بَقِيعِ الْغَرْقَدِ - قَالَ - فَمَا أَوْثَقْنَاهُ وَلاَ حَفَرْنَا لَهُ - قَالَ - فَرَمَيْنَاهُ بِالْعَظْمِ وَالْمَدَرِ وَالْخَزَفِ - قَالَ - فَاشْتَدَّ فَاشْتَدَدْنَا خَلْفَهُ حَتَّى أَتَى عُرْضَ الْحَرَّةِ فَانْتَصَبَ لَنَا فَرَمَيْنَاهُ بِجَلاَمِيدِ الْحَرَّةِ - يَعْنِي الْحِجَارَةَ - حَتَّى سَكَتَ - قَالَ - ثُمَّ قَامَ رَسُولُ اللَّهِ صلى الله عليه وسلم خَطِيبًا مِنَ الْعَشِيِّ فَقَالَ ‏ "‏ أَوَكُلَّمَا انْطَلَقْنَا غُزَاةً فِي سَبِيلِ اللَّهِ تَخَلَّفَ رَجُلٌ فِي عِيَالِنَا لَهُ نَبِيبٌ كَنَبِيبِ التَّيْسِ عَلَىَّ أَنْ لاَ أُوتَى بِرَجُلٍ فَعَلَ ذَلِكَ إِلاَّ نَكَّلْتُ بِهِ ‏" ‏ ‏.‏ قَالَ فَمَا اسْتَغْفَرَ لَهُ وَلاَ سَبَّهُ ‏.‏

sunnah.com