The Lord intended, from the time his people entered the land of milk and honey, that he would be the sole King over his people. God used individuals called Judges to uphold his laws, save Israel from its enemies, etc. but always retained to himself the right of sole Ruler. Judges could not make laws. They also were not allowed to explain them as that was the role of the priests. The office of Judge, unlike that of a king, could not be passed down to a person's descendants.
Gideon, who was a Judge over Israel from 1145 to 1105 B.C., had to remind the people how God wanted them to be ruled when they tried to make HIM king! He directly told them that neither he, nor his descendants, would govern over the people like a king. He emphatically informed them that "The LORD shall rule over you" (Judges 8:23, Holy Bible in Its Original Order - A Faithful Version).
Why, then, did ancient Israel, who had Judges over them for many years, suddenly change and have a king? Why did they opt for a human, instead of God, to rule over them? The answer lies in human nature and its desire to live its life apart from the Eternal.
The short story concerning how Israel came to have humans kings begins with the prophet Samuel. He began his service as Judge in 1085 B.C. Thirty-two years later, in his old age, he decided to make his sons Joel and Abiah Judges (1Samuel 8). Unfortunately, the sons soon began to take bribes and pervert justice. Their corruption became so evident that it motivated the elders of Israel to make a special request of Samuel, ". . . appoint a king to rule over us, so that we will have a king, as other countries have" (1Samuel 8:5).
Samuel takes what he is told by the elders as a personal rejection of his leadership. God, however, soon lets him know who is really being rejected. The Eternal tells him, "'You (Samuel) are not the one they have rejected; I AM THE ONE THEY HAVE REJECTED as their king'" (1Samuel 8:7).
Samuel is soon led to anoint Saul as the first human king over a united Israel (1Samuel 9:15 - 17). His reign lasts for forty years (1050 - 1010 B.C.). Because, however, he refused to obey God's commandments (1Samuel 15:10 - 11), his descendants were not allowed to assume the throne. Samuel is then sent to anoint a young man of the tribe of Judah, named David, as the new king (1Samuel 16:11, 13).
David is first made king of Judah before becoming ruler of all the people. He and his son Solomon each reign for forty years. After Solomon's reign the nation splits in two kingdoms (Northern Israel and Judah). The total length of time a united Kingdom of Israel is ruled by a human king is only 120 years (1050 - 930 B.C.).