1 Kings 3:16-28 (BSB) The Tale of Two Prostitutes and the Fate of a Child:
At that time two prostitutes came to the king and stood before him. One woman said, “Please, my lord, this woman and I live in the same house, and I gave birth while she was in the house. On the third day after I gave birth, this woman also had a baby. We were alone, with no one in the house but the two of us.
During the night this woman’s son died because she rolled over on him. So she got up in the middle of the night and took my son from my side while I was asleep. She laid him in her bosom and put her dead son at my bosom.
The next morning, when I got up to nurse my son, I discovered he was dead. But when I examined him, I realized that he was not the son I had borne.” “No,” said the other woman, “the living one is my son and the dead one is your son.”
But the first woman insisted, “No, the dead one is yours and the living one is mine.” So they argued before the king.
Then the king replied, “This woman says, ‘My son is alive and yours is dead,’ but that woman says, ‘No, your son is dead and mine is alive.’ ”
The king continued, “Bring me a sword.” So they brought him a sword, and the king declared, “Cut the living child in two and give half to one and half to the other.”
"Then the woman whose son was alive spoke to the king because she yearned with compassion for her son. “Please, my lord,” she said, “give her the living baby. Do not kill him!”
But the other woman said, “He will be neither mine nor yours. Cut him in two!”
Then the king gave his ruling: “Give the living baby to the first woman.
By no means should you kill him; she is his mother.”
When all Israel heard of the judgment the king had given, they stood in awe of him, for they saw that the wisdom of God was in him to administer justice."