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.