Deuteronomy 17:2-5 NIV

2 If a man or woman living among you in one of the towns the LORD gives you is found doing evil in the eyes of the LORD your God in violation of his covenant,1

References for Deuteronomy 17:2

3 and contrary to my command2 has worshiped other gods,3 bowing down to them or to the sun4 or the moon or the stars of the sky,5

References for Deuteronomy 17:3

4 and this has been brought to your attention, then you must investigate it thoroughly. If it is true6 and it has been proved that this detestable thing has been done in Israel,7

References for Deuteronomy 17:4

5 take the man or woman who has done this evil deed to your city gate and stone that person to death.8

References for Deuteronomy 17:5