Deuteronomy 22:21-24

ISV(i) 21 they are to bring her to the door of her father’s house. Then the men of the city are to stone her with boulders until she dies for doing a detestable thing in Israel—acting like a prostitute while in her father’s house. By doing this, you will remove this evil from among you.
22 “If a man is caught having sexual relations with a married woman, then both of them must die—the man who had sex with the woman and the woman herself—so that this evil will be removed from Israel.
23 “If a man meets a young virgin lady engaged to be married in the city and has sexual relations with her, 24 then the two must be brought to the city gate and there they must be stoned to death—the girl because she was in a city but did not cry out for help, and the man who abused a woman who was engaged to another man. By doing this you are to remove this evil from among you.