The Germany song was composed in 1797 by Joseph Hayden and the text written in 1841 by August Heinrich Hoffmann. Already in 1922, the song was elected German national anthem.
During the Nazi era, only the first verse was sung, beginning with “Germany, Germany Above Everything”. After the Second World War, the country wanted to distance itself from the connotations of the Nazi regime, and so the third stanza became the official anthem.
Singing the first stanza is not necessarily illegal or prohibited, but it is considered very inappropriate.