The carol was first performed in 1818 in Oberndorf bei Salzburg, Austria, with Gruber composing the melody and Mohr writing the lyrics.