Deuteronomy 21:21

21:21 Then all the men of his city must stone him to death. In this way you will purge out wickedness from among you, and all Israel will hear about it and be afraid.