The song was first performed on Christmas Eve 1818 at St Nicholas parish church in Oberndorf, a village in the Austrian Empire on the Salzach river in present-day Austria. A young priest, Father Joseph Mohr, had come to Oberndorf the year before. He had written the lyrics of the song "Stille Nacht" in 1816 at Mariapfarr, the hometown of his father in the Salzburg Lungau region, where Joseph had worked as a co-adjutor. The melody was composed by Franz Xaver Gruber, schoolmaster and organist in the nearby village of Arnsdorf. Before Christmas Eve, Mohr brought the words to Gruber and asked him to compose a melody and guitar accompaniment for the Christmas Eve mass.