And as she was giving birth, one of them put out his hand; so the midwife took a scarlet thread and tied it around his wrist. “This one came out first,” she announced.
Here is, I. Judah's rigour against Tamar, when he heard she was an adulteress. She was, in the eye of the law, Shelah's wife, and therefore her being with child by another was looked upon as an injury and reproach to Judah's family: Bring her forth therefore, says Judah, the master of the family, and let her be burnt; not burnt to death, but burnt...
Commenting on Genesis 38:24-30
And it came to pass as he drew back his hand,.... Into the "uterus" again: that, behold, his brother came out; out of his mother's womb, and so was properly born first: and she said; either Tamar, or rather, her midwife: how hast thou broken forth?
The midwife - bound upon his hand a scarlet thread - The binding of the scarlet thread about the wrist of the child whose arm appeared first in the birth, serves to show us how solicitously the privileges of the birthright were preserved. Had not this caution been taken by the midwife, Pharez would have had the right of primogeniture to the prejudice of his elder brother Zarah.