Mary was found to be pregnant before she lived with her husband Joseph. Joseph planned to divorce Mary quietly because he did not want to disgrace her publicly, but an angel appeared to him in a dream and told him the child was conceived by the Holy Spirit and to name him Jesus. The birth fulfilled a prophecy that the virgin would conceive and bear a son named Immanuel, meaning "God with us". Joseph took Mary as his wife but did not consummate the marriage until after Jesus was born.