Sayyiduna Buraydah (may Allah be pleased with him) said: I was sitting with the Prophet (peace and blessings be upon him) when Sayyiduna Ma'iz (may Allah be pleased with him) came and said: "O Prophet of Allah, I have committed adultery, and I want to be purified." He (peace and blessings be upon him) said: "Go back." The next day he came again, and the Prophet (peace and blessings be upon him) again said: "Go back." And he (peace and blessings be upon him) sent a man to his people, saying: "Go and ask what is the matter with Ma'iz. How is he? Is there something (wrong) with his mind?" They said: "O Prophet of Allah, we have not seen any such thing in him." On the third day he came again, and the Prophet (peace and blessings be upon him) again asked his people and received the same answer. So the Prophet (peace and blessings be upon him) gave the order; then a pit was dug for him, Sayyiduna Ma'iz (may Allah be pleased with him) was placed in it up to his chest, and then he was stoned.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 16965