structural:scholar_edition, structural:summarization
Viennese celebrity

Haydn returned to Vienna in 1795. Prince Anton had died, and his successor Nikolaus II proposed that the Esterházy musical establishment be revived with Haydn serving again as Kapellmeister. Haydn took up the position on a part-time basis. He spent his summers with the Esterházys in Eisenstadt, and over the course of several years wrote six masses for them including the Lord Nelson mass in 1798.

By this time Haydn had become a public figure in Vienna. He spent most of his time in his home, a large house in the suburb of Windmühle, and wrote works for public performance. In collaboration with his librettist and mentor Gottfried van Swieten, and with funding from van Swieten's Gesellschaft der Associierten, he composed his two great oratorios, The Creation (1798) and The Seasons (1801). Both were enthusiastically received. Haydn frequently appeared before the public, often leading performances of The Creation and The Seasons for charity benefits, including Tonkünstler-Societät programs with massed musical forces. He also composed instrumental music: the popular Trumpet Concerto, and the last nine in his long series of string quartets, including the Fifths, Emperor, and Sunrise. Directly inspired by hearing audiences sing God Save the King in London, in 1797 Haydn wrote a patriotic "Emperor's Hymn" " Gott erhalte Franz den Kaiser ", ("God Save Emperor Francis"). This achieved great success and became "the enduring emblem of Austrian identity right up to the First World War" (Jones). The melody was used for von Fallersleben's Deutschlandlied (1841), which was written as part of the German unification movement and whose third stanza is today the national anthem of the Federal Republic of Germany. (Modern Austria uses a different anthem.)

During the later years of this successful period, Haydn faced incipient old age and fluctuating health, and he had to struggle to complete his final works. His last major work, from 1802, was the sixth mass for the Esterházys, the Harmoniemesse.