Read Deuteronomy 17:15 Using Other Translations
Thou shalt in any wise set him king over thee, whom the LORD thy God shall choose: one from among thy brethren shalt thou set king over thee: thou mayest not set a stranger over thee, which is not thy brother.
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.
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.