Among David's courtiers and attendants, a prominent place is occupied by his counsellor Ahithophel, with whom the king was connected by family ties, Bath-sheba being his granddaughter. Ahithophel's wisdom was supernatural, for his counsels always coincided with the oracles rendered by the Urim and Thummim, and great as was his wisdom, it was equalled by his scholarship. Therefore David did not hesitate to submit himself to his instruction, even though Ahithophel was a very young man, at the time of his death not more than thirty-three years old. The one thing lacking in him was sincere piety, and this it was that proved his undoing in the end, for it induced him to take part in Absalom's rebellion against David. Thus he forfeited even his share in the world to come.
Ahithophel the Advisor Whose Wisdom Rivaled an Oracle
Legends of the Jews 4:32