God as King over his people
God intended, from the time the children of Israel 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 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!
22. And the men of Israel said to Gideon, "Rule over us, both you and your son, and your son's son also, for you have delivered us from the hand of Midian." 23. And Gideon said to them, "I will not rule over you, neither shall my son rule over you. The LORD shall rule over you." (Judges 8:22-23, Holy Bible in Its Original Order - A Faithful Version (HBFV))
Israel asks for a human king
How, then, did Israel come to have a human king - instead of God - rule over them?
The prophet Samuel 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 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 as a personal rejection of his leadership. God, however, soon lets him know who is really being rejected.
'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 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 sent to anoint a young man of the tribe of Judah, named David, as the new king.
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. The total length of time a united Kingdom of Israel is ruled by a human king is 120 years (1050 - 930 B.C.).