Dates: c. 600–650 · Wikipedia
Summary: This Latin infancy gospel, though late, reworks much older material (the second-century
Protoevangelium of James above all) and is the text that fuses the two
older pictures into the scene Western imagination has kept ever since: Mary bears the child in a cave, then
on the third day moves to a stable and lays him in the manger, where an ox and an ass adore him. The
cave-and-stable hybrid and the two beasts — neither of them in the canonical Gospels — are its enduring
legacy.
And he commanded the blessed Mary to come down off the animal, and go into a recess under a cavern, in which there never was light, but always darkness, because the light of day could not reach it. And when the blessed Mary had gone into it, it began to shine with as much brightness as if it were the sixth hour of the day. … The light from God so shone in the cave, that neither by day nor night was light wanting as long as the blessed Mary was there.
— Gospel of Pseudo-Matthew 13, source. The birth itself happens in the cave, exactly as in the Protoevangelium, whose “great light” in the cave this passage develops. The stable has not yet entered the story.
And on the third day after the birth of our Lord Jesus Christ, the most blessed Mary went forth out of the cave, and entering a stable, placed the child in the stall, and the ox and the ass adored Him. Then was fulfilled that which was said by Isaiah the prophet, saying: The ox knows his owner, and the ass his master’s crib. The very animals therefore, the ox and the ass, having Him in their midst, incessantly adored Him. Then was fulfilled that which was said by Abacuc the prophet, saying: Between two animals you are made manifest. In the same place Joseph remained with Mary three days.
— Gospel of Pseudo-Matthew 14, source. Here is the join that the earlier witnesses never make: the family keeps both the cave (from the apocryphal and Palestinian tradition) and the stable-with-manger (drawn from Luke), by having Mary move from the one to the other on the third day. The result is the familiar grotto-and-stable of later Nativity art. The ox and the ass, absent from every canonical account, are imported here straight from prophecy — Isaiah 1:3 (“the ox knoweth his owner, and the ass his master’s crib”) and the Old Latin / Septuagint reading of Habakkuk 3:2 (“between two animals thou art made known”), where the Hebrew has “in the midst of the years.”