When Samuel became old, he made his sons judges over Israel.
The name of his firstborn son was Joel, and the name of his second, Abijah; they were judges in Beer-sheba.
Yet his sons did not follow in his ways, but turned aside after gain; they took bribes and perverted justice.
Then all the elders of Israel gathered together and came to Samuel at Ramah,
and said to him, "You are old and your sons do not follow in your ways; appoint for us, then, a king to govern us, like other nations."
But the thing displeased Samuel when they said, "Give us a king to govern us." Samuel prayed to the Lord,
and the Lord said to Samuel, "Listen to the voice of the people in all that they say to you; for they have not rejected you, but they have rejected me from being king over them.
Just as they have done to me, from the day I brought them up out of Egypt to this day, forsaking me and serving other gods, so also they are doing to you.
References for 1 Samuel 8:8
Now then, listen to their voice; only—you shall solemnly warn them, and show them the ways of the king who shall reign over them."
So Samuel reported all the words of the Lord to the people who were asking him for a king.