Deuteronomy 17:11-20 ESV
According to the instructions that they give you, and according to the decision which they pronounce to you, you shall do. You shall not turn aside from the verdict that they declare to you, either to the right hand or to the left. The man who acts presumptuously by not obeying the priest who stands to minister there before the LORD your God, or the judge, that man shall die. So you shall purge the evil from Israel. And all the people shall hear and fear and not act presumptuously again. “When you come to the land that the LORD your God is giving you, and you possess it and dwell in it and then say, ‘I will set a king over me, like all the nations that are around me,’ you may indeed set a king over you whom the LORD your God will choose. One from among your brothers you shall set as king over you. You may not put a foreigner over you, who is not your brother. Only he must not acquire many horses for himself or cause the people to return to Egypt in order to acquire many horses, since the LORD has said to you, ‘You shall never return that way again.’ And he shall not acquire many wives for himself, lest his heart turn away, nor shall he acquire for himself excessive silver and gold. “And when he sits on the throne of his kingdom, he shall write for himself in a book a copy of this law, approved by the Levitical priests. And it shall be with him, and he shall read in it all the days of his life, that he may learn to fear the LORD his God by keeping all the words of this law and these statutes, and doing them, that his heart may not be lifted up above his brothers, and that he may not turn aside from the commandment, either to the right hand or to the left, so that he may continue long in his kingdom, he and his children, in Israel.