24 And it came to pass, about three months after, that Judah was told, saying, “Tamar your daughter-in-law has played the harlot; furthermore she is with child by harlotry.” So Judah said, “Bring her out and let her be burned!”
25 When she was brought out, she sent to her father-in-law, saying, “By the man to whom these belong, I am with child.” And she said, “Please determine whose these are—the signet and cord, and staff.”
26 So Judah acknowledged them and said, “She has been more righteous than I, because I did not give her to Shelah my son.” And he never knew her again.
27 Now it came to pass, at the time for giving birth, that behold, twins were in her womb.
28 And so it was, when she was giving birth, that the one put out his hand; and the midwife took a scarlet thread and bound it on his hand, saying, “This one came out first.”
29 Then it happened, as he drew back his hand, that his brother came out unexpectedly; and she said, “How did you break through? This breach be upon you!” Therefore his name was called Perez.
30 Afterward his brother came out who had the scarlet thread on his hand. And his name was called Zerah.
Even though Tamar was living back in her own father’s home, she was still under Judah’s authority, nominally engaged to his son Shelah. The penalty for adultery in such a case, even in an ungodly society like that of Canaan, was death, as may be observed in the Code of Hammurabi and other ancient codes. In all such systems there seems to have been a double standard, with much more severe penalties being imposed on the woman than on the man, evidently on the basis of the shame attached to a man having some other man’s child born in his family. — Morris, page 555.
The midwife attending the birth first saw a tiny hand emerge and, in order to keep the twins distinct, assuming this one would be born first, she tied a scarlet thread on his hand. But then, surprisingly, his hand drew back, and the other twin forged ahead and came out first. The latter was named Perez, meaning “breaking-through,” in token of the manner of his birth. The other was named Zerah, meaning “rising.” It was he on whose hand had been tied the scarlet thread.
Tamar, therefore, had the distinction of being one of the few women whose names are listed in the official genealogy of Jesus (Matthew 1:3). The others were Rahab, Ruth, and the one who had been thew wife of Uriah, that is, Bathsheba (Matthew 1:5-6). It is remarkable that all four of these women were non-Jews … Tamar was a Canaanite, Rahab a native of Jericho and thus presumably also a Canaanite, Ruth was a Moabitess, and Bathsheba probably a Hittite (at least by marriage to Uriah, if not by birth. — Morris, pages 556-557.