He continued to lead the life of a shepherd until, at the age of twenty-eight, he was anointed king by Samuel, who was taught by a special revelation that the despised youngest son of Jesse was to be king. Samuel's first charge had been to anoint one of the sons of Jesse, but he was not told which one. When he saw the oldest, Eliab, he thought him the king of God's choice. God had allowed him to be deceived, in order to punish Samuel for his excessive self-consciousness in calling himself the seer.
It was thus proved to him that he could not foresee all things. However, Samuel's error was pardonable. God's first choice had rested upon Eliab. Only on account of his violent nature, his swiftness to anger against David, the position destined for him was transferred to his youngest brother.
Eliab was in a sense compensated by seeing his daughter become the wife of Rehoboam. Thus he, too, enjoys the distinction of being among the ancestors of the Judaic kings, and Samuel's vision of Eliab as king was not wholly false.