Genesis 38:27-30 King James Version (KJV)
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.