The music was written by Haydn in 1797 as the anthem of Austria. It was called "Gott erhalte Franz den Kaiser" ("God protect our Emperor Franz"). The words which are used today were written by the poet August Heinrich Hoffman von Fallersleben in 1841. 