Protevangelium of James 14

1And Joseph was sore afraid and ceased from speaking unto her ( or left her alone), and pondered what he should do with her. And Joseph said: If I hide her sin, I shall be found fighting against the law of the Lord: and if I manifest her unto the children of Israel, I fear lest that which is in her be the seed of an angel, and I shall be found delivering up innocent blood to the judgement of death. What then shall I do? I will let her go from me privily. And the night came upon him.
Καὶ ἐφοβήθη Ἰωσὴφ σφόδρα, καὶ ἠρέμησεν ἐξ αὐτῆς, καὶ διελογίζετο τὸ τί αὐτὴν ποιήσει. καὶ εἶπεν Ἰωσήφ· ἐὰν αὐτῆς κρύψω τὸ ἁμάρτημα, εὑρίσκομαι μαχόμενος τῷ νόμῳ κυρίου· καὶ ἐὰν αὐτὴν φανερώσω τοῖς υἱοῖς Ἰσραήλ, φοβοῦμαι μήπως ἀγγελικόν ἐστιν τὸ ἐν αὐτῇ, καὶ εὑρεθήσομαι παραδιδοὺς αἷμα ἀθῷον εἰς κρίμα θανάτου. τί οὖν αὐτὴν ποιήσω; λάθρα αὐτὴν ἀπολύσω ἀπ᾽ ἐμοῦ. καὶ κατέλαβεν αὐτὸν ἡ νύξ. (37950)
2And behold an angel of the Lord appeared unto him in a dream, saying: Fear not this child, for that which is in her is of the Holy Ghost, and she shall bear a son and thou shalt call his name Jesus, for he shall save his people from their sins. And Joseph arose from sleep and glorified the God of Israel which had shown this favour unto her: and he watched over her.
Καὶ ἰδοὺ ἄγγελος κυρίου φαίνεται αὐτῷ κατ᾽ ὄναρ λέγων· μὴ φοβηθῇς τὴν παῖδα ταύτην· τὸ γὰρ ἐν αὐτῇ ὂν ἐκ πνεύματός ἐστιν ἁγίου· τέξεται δὲ υἱόν, καὶ καλέσεις τὸ ὄνομα αὐτοῦ Ἰησοῦν· αὐτὸς γὰρ σώσει τὸν λαὸν αὐτοῦ ἀπὸ τῶν ἁμαρτιῶν αὐτῶν. καὶ ἀνέστη Ἰωσὴφ ἀπὸ τοῦ ὕπνου, καὶ ἐδόξασεν τὸν θεὸν Ἰσραὴλ τὸν δόντα αὐτῷ τὴν χάριν ταύτην, καὶ ἐφύλασσεν αὐτήν. (36057)
See also: Matthew 1:21