Joseph was the husband of Mary and the legal earthly father of Jesus. A descendant of David, he is portrayed in Matthew as a righteous man who obeyed God's direction concerning Mary's miraculous pregnancy. Joseph protected Mary and Jesus, took the family to Egypt when Herod threatened the child, returned after Herod's death, and established the household in Nazareth.