A thief was brought to the Messenger of Allah ﷺ who confessed openly, though no stolen goods were found with him. The Messenger of Allah ﷺ said to him, "I do not think you stole."The man replied, "Yes, I did."The Prophet ﷺ said, "Take him away and cut off his hand, then bring him back."So they cut off his hand and brought him back. He then said to him, "Say, 'I seek Allah's forgiveness and turn to Him in repentance.'"The man said, "I seek Allah's forgiveness and turn to Him in repentance."The Prophet ﷺ said, "O Allah, accept his repentance."
أخبرنا سويد بن نصر قال حدثنا عبد الله بن المبارك عن حماد بن سلمة عن إسحق بن عبد الله بن أبي طلحة عن أبي المنذر مولى أبي ذر
أن رسول الله ﷺ أتي بلص اعترف اعترافا ولم يوجد معه متاع فقال له رسول الله ﷺ ما إخالك سرقت قال بلى قال اذهبوا به فاقطعوه ثم جيئوا به فقطعوه ثم جاءوا به فقال له قل أستغفر الله وأتوب إليه فقال أستغفر الله وأتوب إليه قال اللهم تب عليه
[Its isnad is daif] Abu Dawud narrated it in the Book of Legal Punishments, Chapter on Prompting during a Legal Punishment, no. 4380, from the hadith of Hammad bin Salama with this wording. It is also in Kubra, no. 7363. Abu Mundhir is unknown, as Dhahabi said.