"If a matter arises which is too hard for you to judge, between degrees of guilt for bloodshed, between one judgment or another, or between one punishment or another, matters of controversy within your gates, then you shall arise and go up to the place which the LORD your God chooses.
Deuteronomy 17:8
Surrounding context
17:7 The hands of the witnesses shall be the first against him to put him to death, and afterward the hands of all the people. So you shall put away the evil from among you.
17:8 "If a matter arises which is too hard for you to judge, between degrees of guilt for bloodshed, between one judgment or another, or between one punishment or another, matters of controversy within your gates, then you shall arise and go up to the place which the LORD your God chooses.
17:9 And you shall come to the priests, the Levites, and to the judge there in those days, and inquire of them; they shall pronounce upon you the sentence of judgment.