Deuteronomy 24 - 25

1 “When a man takes a wife and marries her, and it happens that she finds no favor in his eyes because he has found some uncleanness in her, and he writes her a certificate of divorce, puts it in her hand, and sends her out of his house, 2 when she has departed from his house, and goes and becomes another man’s wife, 3 if the latter husband detests her and writes her a certificate of divorce, puts it in her hand, and sends her out of his house, or if the latter husband dies who took her as his wife, 4 then her former husband who divorced her must not take her back to be his wife after she has been defiled; for that is an abomination before the Lord, and you shall not bring sin on the land which the Lord your God is giving you as an inheritance …
— DEUTERONOMY 24 - 25