This is how Jesus Christ came to be born. His mother Mary was betrothed to Joseph; but before they came to live together she was found to be with child through the Holy Spirit. Her husband Joseph, being an upright man and wanting to spare her disgrace, decided to divorce her informally. He had made up his mind to do this when suddenly the angel of the Lord appeared to him in a dream and said, “Joseph, son of David, do not be afraid to take Mary home as your wife, because she has conceived what is in her by the Holy Spirit.
She will give birth to a son and you must name him Jesus, because he is the one who is to save his people from their sins.” Now all this took place to fulfill what the Lord had spoken through the prophet:
Look! The virgin is with child and will give birth to a son whom they will call Immanuel, (see Isaiah 7:14) a name which means “God-is-with-us.” When Joseph woke up he did what the angel of the Lord had told him to do: he took his wife to his home; he had not had intercourse with her when she gave birth to a son; and he named him Jesus. —Matthew 1:18–25 NJB
A few verses in Matthew and Luke tell us all we know about St. Joseph. They provide just enough information to demonstrate why he was the divine choice to become the husband of Mary and the foster father of Jesus. Joseph was genealogically perfect for these roles. A distant descendant of King David, he gave Christ the King his royal lineage. Joseph also came from the right hometown. He was from Bethlehem, the city that Scripture predicted would produce the messiah (see Micah 5:1). And as a carpenter (see Matthew 13:55), Joseph was poor—Christ’s condition of preference.
Scripture portrays Joseph as open to God, obedient, upright, and, above all, kind. The saint displayed all of these qualities in his handling of Mary’s surprise pregnancy. Imagine the confusion of emotions that must have flooded him when Mary confided that she was going to have a baby by the Holy Spirit! As a devout observer of the law, Joseph knew that he might have to repudiate his betrothal. But his kindness and confidence in Mary prevented his taking such a harsh step, which would have shamed her. It may have even put her in danger of capital punishment (see Deuteronomy 22:20–21). Joseph must have agonized over his decision, praying intently about it. Finally he decided to divorce Mary quietly. But Joseph was open to God, and in a dream a divine messenger told him to take Mary home as his wife. Joseph did exactly as he was told.
Joseph’s wise dealing with Mary is a model for us when we face complex moral and personal issues. He subordinated his feelings to do what God required. He was open to whatever God wanted, and when he sensed the divine will, he obeyed.