Safwan bin Abdullah (may Allah have mercy on him) narrates that it was said to Safwan bin Umayyah (may Allah be pleased with him): Whoever did not emigrate is ruined. So Safwan (may Allah be pleased with him) came to Madinah and slept in the mosque using his cloak as a pillow. A thief came and took the cloak from under his head, and Safwan (may Allah be pleased with him) caught the thief and brought him to the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) ordered that his hand be cut. Safwan (may Allah be pleased with him) said: I did not intend this; rather, it is a charity to him. He (peace and blessings be upon him) said: "Why did you not do so before you brought him to me?"
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السرقة / 17215