Deuteronomy 17:14

14 When you have come into the land that the Lord your God is giving you, and have taken possession of it and settled in it, and you say, "I will set a king over me, like all the nations that are around me,"

Deuteronomy 17:14 In-Context

12 As for anyone who presumes to disobey the priest appointed to minister there to the Lord your God, or the judge, that person shall die. So you shall purge the evil from Israel.
13 All the people will hear and be afraid, and will not act presumptuously again.
14 When you have come into the land that the Lord your God is giving you, and have taken possession of it and settled in it, and you say, "I will set a king over me, like all the nations that are around me,"
15 you may indeed set over you a king whom the Lord your God will choose. One of your own community you may set as king over you; you are not permitted to put a foreigner over you, who is not of your own community.
16 Even so, he must not acquire many horses for himself, or return the people to Egypt in order to acquire more horses, since the Lord has said to you, "You must never return that way again."
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.