Abu Hurairah related that Allaah’s Messenger said;
There were two women and each of them had a son. A wolf came and took away the son of one of them. One said to the other, “It took away your son.” And the other said, “No, it took away your son.“
So they went to Dawood (David) for judgement, and he ruled for the older of the two. Then they went to Sulaymaan Ibn Dawood (Solomon, the son of David) and informed him of what happened.
He said, “Bring to me a knife and I will cut him in two.“
The younger of the two women said, “Do not do so, may Allaah have mercy on you, for he is her son.“
Then Sulaymaan (knowing the love of a mother), ruled for the younger of the two women.
[Bukhaari & Muslim]