Haydn had probably encountered the British model during his visits to London. The Kaiserlied was intended to raise national morale at a time of conflict when Napoleon was staking territorial claims in Europe.
In the style of the British national anthem ‘God Save The Queen’, this hymn was conceived in response to the Marseillaise of Napoleonic France, which was composed in 1792 while war was being declared on Austria and was elevated to the status of national anthem in 1795. In 1797 Joseph Haydn composed arguably his most famous melody, the song ‘Gott erhalte’.