Protevangelium of James 13

1Now it was the sixth month with her, and behold Joseph came from his building, and he entered into his house and found her great with child. And he smote his face, and cast himself down upon the ground on sackcloth and wept bitterly, saying: With what countenance shall I look unto the Lord my God? and what prayer shall I make concerning this maiden? for I received her out of the temple of the Lord my God a virgin, and have not kept her safe. Who is he that hath ensnared me? Who hath done this evil in mine house and hath defiled the virgin? Is not the story of Adam repeated in me? for as at the hour of his giving thanks the serpent came and found Eve alone and deceived her, so hath it befallen me also.
2And Joseph arose from off the sackcloth and called Mary and said unto her O thou that wast cared for by God, why hast thou done this? thou hast forgotten the Lord thy God. Why hast thou humbled thy soul, thou that wast nourished up in the Holy of Holies and didst receive food at the hand of an angel?
3But she wept bitterly, saying: I am pure and I know not a man. And Joseph said unto her: Whence then is that which is in thy womb? and she said: As the Lord my God liveth, I know not whence it is come unto me.