The origins of the Medieval Latin responsorial chant known as “O Magnum Mysterium” are not really clear any more. It’s early; before the tenth century.
“O Magnum Mysterium” was part of the matins service for Christmas. For much of the Middle Ages, matins took place roughly at midnight. The Latin text describes the nativity scene in which Christ was born and laid in a manger, and animals were witnesses to the sacrament of his birth:
O magnum mysterium,
et admirabile sacramentum,
ut animalia viderent Dominum natum,
jacentem in praesepio!
Beata Virgo, cujus viscera
O great mystery,
and wonderful sacrament,
that animals should see the new-born Lord,
lying in a manger!
Blessed is the Virgin whose womb
was worthy to bear
Christ the Lord.
The text was inspired by two verses of the New Testament, first Luke 2:7 (quoted here from the Wycliffe Bible) :
And sche bare hir first borun sone, and wrappide hym in clothis, and leide hym in a cratche, for ther was no place to hym in no chaumbir.
Or in Modern English:
And she bore her first born son, and wrapped him in cloths, and laid him in a cratche, for there was no place to him in no chamber.
The second part is derived from Isaiah 1.3 which refers to animals present at the birth of Christ:
An oxe knew his lord, and an asse knew the cratche of his lord; but Israel knewe not me, and my puple vndurstood not.
An ox knew his lord, and an ass knew the cratche of his lord; but Israel knew not me, and my people understood not.
The juxtaposition of the two verses in the minds of medieval illuminators and many poets led to the familiar scene of the nativity in a stable with the manger, with the resident animals looking on, and, in the words of Isaiah, they “knew” the baby as Christ.
It’s the reference to the manger, or cratche in Middle English, that led illuminators and others to set the scene in a stable. It isn’t strictly speaking accurate in terms of what the Greek text says, and what we know of the times. The Greek (Koine) word translated as “inn” is perhaps better thought of as the “guest room.”
For me, as a child hearing carols and seeing Medieval and Renaissance depictions of the nativity in my parents’ books, the part that caught my imagination was the folklore around animals talking at midnight on Christmas Eve. This has been captured in the Christmas Carol known today as “The Friendly Beasts.” This was one of my favorite carols as a child.[ref]“The Friendly Beasts” began life as a 12th century Latin song from France known as “Orientis Partibus,” translated and made popular in a version attributed to Robert Davis (1881-1950) in the 1920s.[/ref]
There are a number of “settings” of the original Latin of “O Magnum Mysterium”; I’m partial to Palestrina’s (c. 1525 – February 1594) six-part motet, but there are many others including settings by William Byrd, Gabrielli, and for modern composers, the incredibly beautiful version by Morten Laridsen, which, as the composer explains, was also inspired by Francisco de Zurbarán’s 1733 “Still Life With Lemons, Oranges and a Rose.”
You can hear Morten Laridsen’s stunning “O Magnum Mysterium on YouTube.” O Magnum Mysterium is also part of Britten’s Ceremony of Carols.