Abu Masud Uqba bin Amr reported,

I was beating a slave-boy of mine when I heard a voice behind me saying, "Know, Abu Masud," and Ibn al-Muthanna said he repeated it twice, "that Allah has more power over you than you have over him."I turned around, and there was the Prophet ﷺ.I said, "Messenger of Allah, he is free for the sake of Allah the Exalted."He said, "Had you not done so, the Fire would have scorched you," or "the Fire would have touched you."

Abu Dawud 5159

Sahih

حدثنا محمد بن العلاء قال حدثنا أبو معاوية ح و حدثنا ابن المثنى قال حدثنا أبو معاوية عن الأعمش عن إبراهيم التيمي عن أبيه

عن أبي مسعود الأنصاري قال

كنت أضرب غلاما لي فسمعت من خلفي صوتا اعلم أبا مسعود قال ابن المثنى مرتين لله أقدر عليك منك عليه فالتفت فإذا هو النبي ﷺ فقلت يا رسول الله هو حر لوجه الله تعالى قال أما إنك لو لم تفعل للفعتك النار أو لمستك النار

أبو داود 5159صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Manners
Chapter
Right of the slave
Numbering
Darussalam 5159
Abu Dawud 5159