Deuteronomy 20:7

7 aAnd is there any man who has betrothed a wife and has not taken her? Let him go back to his house, lest he die in the battle and another man take her.’

Matthew 1:18-19

The Birth of Jesus Christ

18Now the birth of bJesus Christ
Some manuscripts  of the Christ
took place in this way. dWhen his mother Mary had been betrothed
That is, legally pledged to be married
to Joseph, before they came together she was found to be with child ffrom the Holy Spirit.
19And her husband Joseph, being a just man and unwilling gto put her to shame, resolved to divorce her quietly.
Copyright information for ESV