Joseph see's that Mary his virgin wife is pregnant and according to the law should be stoned to death, yet because he is a just man and didn't want to put her away publicly or make a scene, decided to put her away privately.

Meanwhile the angel of from the Lord visited Joseph in a dream and explained that Mary had conceived of the Holy Ghost, and that she will have a male child and to name Him Jesus.