Samuel [Shmuel] the Prophet made it very clear to Israel that their asking for king was against God's will. This is curious since in the Torah one of the commandment is to make a king. Though I have heard one answer that they said "a king like the other nations" but so what? The Torah also makes the same sort of reference, John Locke suggested a king meant the head of the military and he shows proofs of this. One answer that makes sense is the command to make a king in the Torah would be after the whole land of Israel would be conquered. In any case, it does not say how the king would be chosen. Thoughit was through the prophet or sanhedrin I wonder about voting.