Deuteronomy 17:14-20
14 “You are about to enter the land the Lord your God is giving you. When you take it over and settle there, you may think, ‘We should select a king to rule over us like the other nations around us.’ 15 If this happens, be sure to select as king the man the Lord your God chooses. You must appoint a fellow Israelite; he may not be a foreigner.
16 “The king must not build up a large stable of horses for himself or send his people to Egypt to buy horses, for the Lord has told you, ‘You must never return to Egypt.’ 17 The king must not take many wives for himself, because they will turn his heart away from the Lord. And he must not accumulate large amounts of wealth in silver and gold for himself.
18 “When he sits on the throne as king, he must copy for himself this body of instruction on a scroll in the presence of the Levitical priests. 19 He must always keep that copy with him and read it daily as long as he lives. That way he will learn to fear the Lord his God by obeying all the terms of these instructions and decrees. 20 This regular reading will prevent him from becoming proud and acting as if he is above his fellow citizens. It will also prevent him from turning away from these commands in the smallest way. And it will ensure that he and his descendants will reign for many generations in Israel.