Then David mustered the men who were with him, and set over them commanders of thousands and commanders of hundreds. And David divided the army into three groups: one third under the command of Joab, one third under the command of Abishai son of Zeruiah, Joab's brother, and one third under the command of Ittai the Gittite. The king said to the men, "I myself will also go out with you." But the men said, "You shall not go out. For if we flee, they will not care about us. If half of us die, they will not care about us. But you are worth ten thousand of us; therefore it is better that you send us help from the city." The king said to them, "Whatever seems best to you I will do." So the king stood at the side of the gate, while all the army marched out by hundreds and by thousands. The king ordered Joab and Abishai and Ittai, saying, "Deal gently for my sake with the young man Absalom." And all the people heard when the king gave orders to all the commanders concerning Absalom.
So the army went out into the field against Israel; and the battle was fought in the forest of Ephraim. The men of Israel were defeated there by the servants of David, and the slaughter there was great on that day, twenty thousand men. The battle spread over the face of all the country; and the forest claimed more victims that day than the sword.
Absalom happened to meet the servants of David. Absalom was riding on his mule, and the mule went under the thick branches of a great oak. His head caught fast in the oak, and he was left hanging between heaven and earth, while the mule that was under him went on. A man saw it, and told Joab, "I saw Absalom hanging in an oak." Joab said to the man who told him, "What, you saw him! Why then did you not strike him there to the ground? I would have been glad to give you ten pieces of silver and a belt." But the man said to Joab, "Even if I felt in my hand the weight of a thousand pieces of silver, I would not raise my hand against the king's son; for in our hearing the king commanded you and Abishai and Ittai, saying: For my sake protect the young man Absalom! On the other hand, if I had dealt treacherously against his life (and there is nothing hidden from the king), then you yourself would have stood aloof." Joab said, "I will not waste time like this with you." He took three spears in his hand, and thrust them into the heart of Absalom, while he was still alive in the oak. And ten young men, Joab's armor-bearers, surrounded Absalom and struck him, and killed him.
Then Joab sounded the trumpet, and the troops came back from pursuing Israel, for Joab restrained the troops. They took Absalom, threw him into a great pit in the forest, and raised over him a very great heap of stones. Meanwhile all the Israelites fled to their homes. Now Absalom in his lifetime had taken and set up for himself a pillar that is in the King's Valley, for he said, "I have no son to keep my name in remembrance"; he called the pillar by his own name. It is called Absalom's Monument to this day.