Samuel said to the people, It is Yahweh who appointed Moses and Aaron, and that brought your fathers up out of the land of Egypt.
"Then the hand of the Lord will be against you and your king"  (1 Samuel 12:15).  This was the penalty against Israel and their king if they did not follow the Lord and obey his commandments.