Two prostitute mothers
Two prostitute mothers sought King Solomon's aid in resolving a dispute. The two women both lived in the same house, and they each gave birth to a child, yet the child of one of the mothers had died. One mother accused the other of replacing her living child with the other's dead child, while the other mother claimed that such a switch did not occur. Thus, Solomon had to determine which mother the remaining child belongs to.
Prior to this, Solomon had prayed to God and asked God for wisdom that would enable him to judge and govern justly. God was pleased that Solomon requested wisdom instead of longevity, wealth, or victory. God answered Solomon's prayer and granted Solomon wisdom, making Solomon wiser than anyone before or since, as well as granting him the things he did not ask: wealth, honor, and if Solomon continued to follow the ways of the Lord, longevity.
Now Solomon used his wisdom and asked for a sword. Solomon was brought a sword, and he said,
Cut the living child in two, and give half to the one [woman] and half to the other (1 Kings 3:25 (AMP)).
Not wishing for her son to be cut in two, the true mother asked for her child to be given in whole to the other woman in order to save it, but the other (extremely vindictive) woman sought to have the child cut in two. Thus, Solomon was able to determine that the true mother was woman pleading for the child to be handed over, in whole, to the other women, so Solomon ordered the child to played in custody of the true mother.
Then the woman whose child was the living one spoke to the king, for she was deeply moved over her son,O my lord, give her the living child, and by no means kill him.But the other said,He shall be neither mine nor yours; cut him!Then the king said,Give the first woman [who is pleading for his life] the living child, and by no means kill him. She is his mother.— 1 Kings 3:26–3:27 (AMP)
The people of Israel learned of the incident, acknowledged Solomon's wisdom, and feared him as subjects.