Malik related to me from Hilal ibn Usama from Ata ibn Yasar that Umar ibn al-Hakam said, "I went to the Messenger of Allah ﷺ and said, 'Messenger of Allah, a slave girl of mine was tending my sheep. I came to her and one of the sheep was lost. I asked her about it and she said that a wolf had eaten it, so I became angry and I am one of the children of Adam, so I struck her on the face. As it happens, I have to set a slave free, shall I free her?' The Messenger of Allah ﷺ questioned her, 'Where is Allah?' She said, 'In heaven.' He said, 'Who am I?' She said, 'You are the Messenger of Allah.' The Messenger of Allah ﷺ said, 'Free her.' "
أَنَّهُ قَالَ أَتَيْتُ رَسُولَ اللَّهِ ﷺ فَقُلْتُ يَا رَسُولَ اللَّهِ إِنَّ جَارِيَةً لِي كَانَتْ تَرْعَى غَنَمًا لِي فَجِئْتُهَا وَقَدْ فُقِدَتْ شَاةٌ مِنَ الْغَنَمِ فَسَأَلْتُهَا عَنْهَا فَقَالَتْ أَكَلَهَا الذِّئْبُ فَأَسِفْتُ عَلَيْهَا وَكُنْتُ مِنْ بَنِي آدَمَ فَلَطَمْتُ وَجْهَهَا وَعَلَىَّ رَقَبَةٌ أَفَأُعْتِقُهَا فَقَالَ لَهَا رَسُولُ اللَّهِ ﷺ أَيْنَ اللَّهُ فَقَالَتْ فِي السَّمَاءِ فَقَالَ مَنْ أَنَا فَقَالَتْ أَنْتَ رَسُولُ اللَّهِ فَقَالَ رَسُولُ اللَّهِ ﷺ أَعْتِقْهَا