Genesis 38:28

38:28 While she was giving birth, one child put out his hand, and the midwife took a scarlet thread and tied it on his hand, saying, “This one came out first.”

Genesis 38:30

38:30 Afterward his brother came out – the one who had the scarlet thread on his hand – and he was named Zerah.