Deuteronomy 22:22-24 NIV

22 If a man is found sleeping with another man's wife, both the man who slept1 with her and the woman must die.2 You must purge the evil from Israel.

References for Deuteronomy 22:22

23 If a man happens to meet in a town a virgin pledged to be married and he sleeps with her,
24 you shall take both of them to the gate of that town and stone them to death--the girl because she was in a town and did not scream for help, and the man because he violated another man's wife. You must purge the evil from among you.3

References for Deuteronomy 22:24