However, hopes for human rights and republican government after Napoleon's defeat in 1815 were dashed when the Congress of Vienna reinstated many small German principalities. The Holy Roman Empire, stemming from the Middle Ages, was already disintegrating when the French Revolution and the ensuing Napoleonic Wars altered the political map of Central Europe. 3, a string quartet, often called the "Emperor" or "Kaiser" quartet. Haydn later used the hymn as the basis for the second movement ( poco adagio cantabile) of his Opus 76 No. For further discussion see Haydn and folk music. This hypothesis has never achieved unanimous agreement the alternative theory reverses the direction of transmission, positing that Haydn's melody was adapted as a folk tune. It has been conjectured that Haydn took the first four measures of the melody from a Croatian folk song. It is often used as the musical basis for the hymn " Glorious Things of Thee Are Spoken". It was the music of the National Anthem of Austria-Hungary until the abolition of the Habsburg Monarchy in 1918. Haydn's work is sometimes called the "Emperor's Hymn" (Kaiserhymne). The song was a birthday anthem honouring Francis II (1768–1835), Habsburg emperor, and was intended as a parallel to Great Britain's " God Save the King". The melody of the " Deutschlandlied", also known as “the Austria tune”, was written by Joseph Haydn in 1797 to provide music to the poem " Gott erhalte Franz den Kaiser" ("God save Francis the Emperor") by Lorenz Leopold Haschka.
Upon German reunification in 1990, only the third stanza was confirmed as the national anthem.
West Germany adopted the " Deutschlandlied" as its official national anthem in 1952 for similar reasons, with only the third stanza sung on official occasions. In order to endorse its republican and liberal tradition, the song was chosen as the national anthem of Germany in 1922, during the Weimar Republic. Along with the flag of Germany, which first appeared in its essentially "modern" form in 1778, it was one of the symbols of the March Revolution of 1848.
In 1841, the German linguist and poet August Heinrich Hoffmann von Fallersleben wrote the lyrics of " Das Lied der Deutschen" as a new text for that music, counterposing the national unification of Germany to the eulogy of a monarch, lyrics that were considered revolutionary at the time. The music is the hymn " Gott erhalte Franz den Kaiser", written in 1797 by the Austrian composer Joseph Haydn as an anthem for the birthday of Francis II, Emperor of the Holy Roman Empire and later of Austria. That stanza's incipit " Einigkeit und Recht und Freiheit" ("Unity and Justice and Freedom") is considered the unofficial national motto of Germany, and is inscribed on modern German Army belt buckles and the rims of some German coins. After World War II and the fall of Nazi Germany, only the third stanza has been used as the national anthem.