Sahih al-Bukhari 3426, 3427
Narrated Abu Huraira:
Allah's Messenger (ﷺ) said, "My example and the example o the people is like that of a person who lit a fire 
and let the moths, butterflies and these insects fall in it." He also said, "There were two women, each 
of whom had a child with her. A wolf came and took away the child of one of them, whereupon the 
other said, 'It has taken your child.' The first said, 'But it has taken your child.' So they both carried the 
case before David who judged that the living child be given to the elder lady. So both of them went to 
Solomon bin David and informed him (of the case). He said, 'Bring me a knife so as to cut the child 
into two pieces and distribute it between them.' The younger lady said, 'May Allah be merciful to you! 
Don't do that, for it is her (i.e. the other lady's) child.' So he gave the child to the younger lady."
حَدَّثَنَا أَبُو الْيَمَانِ، أَخْبَرَنَا شُعَيْبٌ، حَدَّثَنَا أَبُو الزِّنَادِ، عَنْ عَبْدِ الرَّحْمَنِ، حَدَّثَهُ أَنَّهُ، سَمِعَ أَبَا هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّهُ سَمِعَ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏"‏ مَثَلِي وَمَثَلُ النَّاسِ كَمَثَلِ رَجُلٍ اسْتَوْقَدَ نَارًا، فَجَعَلَ الْفَرَاشُ وَهَذِهِ الدَّوَابُّ تَقَعُ فِي النَّارِ ‏"‏‏.‏   وَقَالَ ‏"‏ كَانَتِ امْرَأَتَانِ مَعَهُمَا ابْنَاهُمَا جَاءَ الذِّئْبُ فَذَهَبَ بِابْنِ إِحْدَاهُمَا، فَقَالَتْ صَاحِبَتُهَا إِنَّمَا ذَهَبَ بِابْنِكِ‏.‏ وَقَالَتِ الأُخْرَى إِنَّمَا ذَهَبَ بِابْنِكِ‏.‏ فَتَحَاكَمَتَا إِلَى دَاوُدَ، فَقَضَى بِهِ لِلْكُبْرَى فَخَرَجَتَا عَلَى سُلَيْمَانَ بْنِ دَاوُدَ فَأَخْبَرَتَاهُ‏.‏ فَقَالَ ائْتُونِي بِالسِّكِّينِ أَشُقُّهُ بَيْنَهُمَا‏.‏ فَقَالَتِ الصُّغْرَى لاَ تَفْعَلْ يَرْحَمُكَ اللَّهُ، هُوَ ابْنُهَا‏.‏ فَقَضَى بِهِ لِلصُّغْرَى ‏"‏‏.‏ قَالَ أَبُو هُرَيْرَةَ وَاللَّهِ إِنْ سَمِعْتُ بِالسِّكِّينِ إِلاَّ يَوْمَئِذٍ، وَمَا كُنَّا نَقُولُ إِلاَّ الْمُدْيَةُ‏.‏