Deuteronomy 22:21-24

21 Then they shall bring out the damsel to the door of her father's house, and the men of her city shall stone her with stones that she die: because she has worked folly in Israel, to play the whore in her father's house: so shall you put evil away from among you.

22 If a man be found lying with a woman married to an husband, then they shall both of them die, both the man that lay with the woman, and the woman: so shall you put away evil from Israel.

23 If a damsel that is a virgin be betrothed to an husband, and a man find her in the city, and lie with her;

24 Then you shall bring them both out to the gate of that city, and you shall stone them with stones that they die; the damsel, because she cried not, being in the city; and the man, because he has humbled his neighbor's wife: so you shall put away evil from among you.