After Absalom and all the men of Israel crossed the Jordan, David counted the troops who were with him, and put over them commanders of thousands and of hundreds. And he divided the troops into three divisions; one was under the command of Joab, another under Abishai, and another under the command of Ittai. Then David said to the people, "I too will surely go out with you." But the people said, "You shall not go out; for if we are defeated, or if half of us die, it will make no difference, for you are equal to ten thousand of us. It is therefore more important for you to be ready to help us from the city." David said to them, "I will do what you think best!" So he stood beside the gate, while all the troops marched out by hundreds and by thousands.
David commanded Joab and Abishai and Ittai, "Deal gently for my sake with the young man, with Absalom!" All the people heard when he gave the commanders this order about Absalom.
So the troops went out into the field against Israel. The battle was fought in the forest of Ephraim. And the soldiers of Israel were defeated there by those who were loyal to David, and the loss of life on that day was great—twenty thousand men. The battle spread over the whole country; and the dense thickets killed more people than were killed by the sword.
Absalom happened to meet the soldiers of David while riding upon his mule, and the mule went under the thick branches of a great oak, and Absalom's head caught fast in the oak, and he was hung between heaven and earth, while the mule that was under him went on. A certain man saw it and told Joab, "I saw Absalom hanging in an oak." Joab said to the man who told him, "You saw him! Why did you not strike him to the ground? I would have given you ten pieces of silver and a belt." But the man said to Joab, "If I were to feel the weight of a thousand pieces of silver in my hand, I would not raise my hand against the ruler's son, for in our hearing he commanded you and Abishai and Ittai, 'Take care of the young man Absalom.' If I had treacherously taken his life, nothing would have been hidden from the ruler of Israel, and you yourself would not have tried to save me." Joab answered, "I will not waste time with you."
So he took three spears in his hand and drove them into Absalom's heart, while he was still alive in the midst of the oak. Then Joab said to a negro slave, "Go, tell the ruler of Israel what you have seen." And the negro bowed before Joab and ran off.
Now David was sitting between the two gates, and when the negro came, he said, "Let my lord receive the good news; the LORD has punished for you this day all those who rose up against you.'" David said to the negro, "Is it well with the young Absalom?" The negro answered, "May the enemies of my lord and all who rebel against you to harm you be as that young man!"
Then David was very sad and went up to the chamber over the gate and wept. As he wept he said, "My son Absalom, my son, O my son Absalom! Oh that I had died for you, Absalom, my son, my son!" And it was reported to Joab, "The ruler of Israel is weeping and mourning for Absalom." So for all the people the victory that day was turned to mourning, because they heard that David was mourning for his son. Therefore, the people stole away into the city, as people who are ashamed steal away when they have run away in battle. But David covered his face and cried aloud, "My son Absalom, Absalom, my son, my son!"