Joseph, her husband, was a just man and unwilling to hold her up to public shame, so he decided to dismiss her quietly.
In context
17So the generations from Abraham to David number fourteen in all; from David to the deportation to Babylon, fourteen; and from the deportation to Babylon to the Christ, fourteen. 18The birth of Jesus Christ came about in this way. His mother, Mary, was engaged to Joseph, and before they came together she was found to be carrying a child by the Holy Spirit. 19Joseph, her husband, was a just man and unwilling to hold her up to public shame, so he decided to dismiss her quietly. 20While he was turning this over in his mind, an 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, for what has been conceived in her comes from the Holy Spirit. 21She will give birth to a son, and you are to give him the name Jesus, because he will rescue his people from their sins.”