Muwatta Malik, Book 38, Hadith 8 (USC-MSA)

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, may Allah bless him and grant him peace, 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, may Allah bless him and grant him peace, 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, may Allah bless him and grant him peace, said, 'Free her.' "

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

sunnah.com

also referenced under: Book 38, Hadith 1473 (In-Book)