Gen 38:18, Gen 38:24-30, Mt 1:1-3

Tamar held onto the covenant of Christ to come and slept with her father-in-law. (Gen 38:13-15,18)

Gen 38:13 And it was told Tamar, saying, Behold thy father in law goeth up to Timnath to shear his sheep. 14 And she put her widow's garments off from her, and covered her with a vail, and wrapped herself, and sat in an open place, which is by the way to Timnath; for she saw that Shelah was grown, and she was not given unto him to wife. 15 When Judah saw her, he thought her to be an harlot; because she had covered her face. 18 And he said, What pledge shall I give thee? And she said, Thy signet, and thy bracelets, and thy staff that is in thine hand. And he gave it her, and came in unto her, and she conceived by him.

Tamar begat Perez by Judah. Christ came as the descendant of Perez. (Gen 38:24-30, Mt 1:1-3)

Gen 38:24 And it came to pass about three months after, that it was told Judah, saying, Tamar thy daughter in law hath played the harlot; and also, behold, she is with child by whoredom. And Judah said, Bring her forth, and let her be burnt. 25 When she was brought forth, she sent to her father in law, saying, By the man, whose these are, am I with child: and she said, Discern, I pray thee, whose are these, the signet, and bracelets, and staff. 26 And Judah acknowledged them, and said, She hath been more righteous than I; because that I gave her not to Shelah my son. And he knew her again no more. 27 And it came to pass in the time of her travail, that, behold, twins were in her womb. 28 And it came to pass, when she travailed, that the one put out his hand: and the midwife took and bound upon his hand a scarlet thread, saying, This came out first. 29 And it came to pass, as he drew back his hand, that, behold, his brother came out: and she said, How hast thou broken forth? this breach be upon thee: therefore his name was called Pharez. 30 And afterward came out his brother, that had the scarlet thread upon his hand: and his name was called Zarah.

Mt 1:1 The book of the generation of Jesus Christ, the son of David, the son of Abraham. 2 Abraham begat Isaac; and Isaac begat Jacob; and Jacob begat Judas and his brethren; 3 And Judas begat Phares and Zara of Thamar; and Phares begat Esrom; and Esrom begat Aram;