Matthew 1:18-25 describes how Mary became pregnant with Jesus through the Holy Spirit. Joseph planned to divorce Mary quietly when he discovered she was pregnant, but an angel appeared to Joseph in a dream and told him the child was conceived by the Holy Spirit and to not be afraid to take Mary as his wife. Joseph did as the angel instructed and took Mary as his wife, but they did not have marital relations until after Jesus was born. Joseph named the baby Jesus, which means "God saves", as he will save people from their sins.