It is narrated from Sayyiduna al-Aswad bin Sari' (may Allah be pleased with him) that a captive was brought to the Prophet (peace and blessings be upon him), and he said: "O Allah! I repent to You, but I do not repent to Muhammad." The Prophet (peace and blessings be upon him) said: "He has recognised the right of the One to whom it belongs."
Hadith Referenceالمعجم الكبير للطبراني / باب الألف / 836