When you enter the land the LORD your God is giving you and have taken possession of it and settled in it, and you say, “Let us set a king over us like all the nations around us,”
be sure to appoint over you a king the LORD your God chooses. He must be from among your fellow Israelites. Do not place a foreigner over you, one who is not an Israelite.
The king, moreover, must not acquire great numbers of horses for himself or make the people return to Egypt to get more of them, for the LORD has told you, “You are not to go back that way again.”
He must not take many wives, or his heart will be led astray. He must not accumulate large amounts of silver and gold.
When he takes the throne of his kingdom, he is to write for himself on a scroll a copy of this law, taken from that of the Levitical priests.
It is to be with him, and he is to read it all the days of his life so that he may learn to revere the LORD his God and follow carefully all the words of this law and these decrees
and not consider himself better than his fellow Israelites and turn from the law to the right or to the left. Then he and his descendants will reign a long time over his kingdom in Israel.