Ahitophel

Ahitophel was a counsellor of King David in the Old Testament. When David's son Absalom rebelled against David, Ahitophel deserted David and went over to Absalom's side. After David's forces were defeated and fled towards the River Jordan, Ahitophel advised Absalom to attack David as he retreated, but David's spy Hushai foiled Absalom by giving him different advice to wait and gather his forces for a larger attack, thus allowing David to escape over the River Jordan and assemble his troops to repel Absalom's attack. When Absalom obeyed Hushai's advice, Ahitophel realised the rebellion was doomed and committed suicide by hanging himself.