Ahitophel or Ahithophel was a counselor of King David and a man greatly renowned for his sagacity. During Absalom's revolt he deserted David (Psalm 41:9; 55:12–14) and supported Absalom (2 Samuel 15:12).
David sent his friend Hushai back to Absalom, in order to counteract the counsel of Ahitophel (2 Samuel 15:31–37). Ahitophel had recommended an immediate attack on David's camp at a point where he was weary and vulnerable (2 Samuel 17:1-2), whereas Hushai suggested that "the advice that Ahithophel has given is not good at this time" (2 Samuel 17:7) and recommended delay while a larger army was assembled to counter David's alleged strength (2 Samuel 17:11-13). Perversely, "for the LORD had purposed to defeat the good advice of Ahithophel" (2 Samuel 17:14), Hushai's advice was accepted. Seeing that his good advice against David had not been followed due to Hushai's influence, Ahithophel apparently surmised that the revolt would fail. He then left the camp of Absalom at once. He returned to Giloh, his native place, and after arranging his worldly affairs, hanged himself, and was buried in the sepulcher of his fathers (2 Samuel 17:23).
A man named Ahitophel is also mentioned in 2 Samuel 23:34, and he is said to be the father of Eliam. Since 2 Samuel 11:3 notes that Eliam is the father of Bathsheba, some scholars suggest that the Ahitophel of 2 Samuel 15 may in fact be Bathsheba's grandfather. Levenson and Halpern, for example, note that "the narrator is sufficiently subtle (or guileless) to have Bathsheba's grandfather ... instigate the exaction of YHWH's pound of flesh," as Nathan's curse in 2 Samuel 12:11 comes to fruition.