Genesis 38:27-30
In the time of her travail, behold, twins were in her womb. When she travailed, one put out a hand, and the midwife took and tied a scarlet thread on his hand, saying, “This came out first.” As he drew back his hand, behold, his brother came out, and she said, “Why have you made a breach for yourself?” Therefore his name was called Perez. Afterward his brother came out, who had the scarlet thread on his hand, and his name was called Zerah.