Sunan Abi Dawud, Hadith 5140

Abu Mas’ud al-Ansari said: when I was beating a servant of mine, I heard a voice behind me saying: know, Abu Mas’ud-Ibn al-Muthanna said: “twice”-that Allah has more power over you than you have over him. I turned round and saw that it was that it was the prophet (May peace be upon him). I said : Messenger of Allah! He is free for Allah’s sake. He said : If you had not done it, fire would have burned you or the fire would have touched you.

حَدَّثَنَا مُحَمَّدُ بْنُ الْعَلاَءِ، قَالَ حَدَّثَنَا أَبُو مُعَاوِيَةَ، ح وَحَدَّثَنَا ابْنُ الْمُثَنَّى، قَالَ حَدَّثَنَا أَبُو مُعَاوِيَةَ، عَنِ الأَعْمَشِ، عَنْ إِبْرَاهِيمَ التَّيْمِيِّ، عَنْ أَبِيهِ، عَنْ أَبِي مَسْعُودٍ الأَنْصَارِيِّ، قَالَ كُنْتُ أَضْرِبُ غُلاَمًا لِي فَسَمِعْتُ مِنْ خَلْفِي صَوْتًا ‏"‏ اعْلَمْ أَبَا مَسْعُودٍ ‏"‏ ‏.‏ قَالَ ابْنُ الْمُثَنَّى مَرَّتَيْنِ ‏"‏ لَلَّهُ أَقْدَرُ عَلَيْكَ مِنْكَ عَلَيْهِ ‏"‏ ‏.‏ فَالْتَفَتُّ فَإِذَا هُوَ النَّبِيُّ صلى الله عليه وسلم فَقُلْتُ يَا رَسُولَ اللَّهِ هُوَ حُرٌّ لِوَجْهِ اللَّهِ ‏.‏ قَالَ ‏"‏ أَمَا إِنَّكَ لَوْ لَمْ تَفْعَلْ لَلَفَعَتْكَ النَّارُ أَوْ ‏"‏ لَمَسَّتْكَ النَّارُ ‏"‏ ‏.‏

sunnah.com

also referenced under: Hadith 5159 (DarusSalam)