Deuteronomy 17:5-9 New King James Version (NKJV)

5. then you shall bring out to your gates that man or woman who has committed that wicked thing, and shall stone to death that man or woman with stones.

6. Whoever is deserving of death shall be put to death on the testimony of two or three witnesses; he shall not be put to death on the testimony of one witness.

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.

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.

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.

Deuteronomy 17