Deuteronomy 17:9-12
17:9 You will go to the Levitical priests and the judge in office in those days and seek a solution; they will render a verdict.
17:10 You must then do as they have determined at that place the Lord chooses. Be careful to do just as you are taught.
17:11 You must do what you are instructed, and the verdict they pronounce to you, without fail. Do not deviate right or left from what they tell you.
17:12 The person who pays no attention to the priest currently serving the Lord your God there, or to the verdict – that person must die, so that you may purge evil from Israel.