Mahler wrote the first movement in 1888 as a self-standing symphonic poem called Totenfeier and then could not find a way to continue; the finale stayed blocked for five years. The solution came at Hans von Bülow's funeral in Hamburg in March 1894, when a boys' choir sang Klopstock's Auferstehn chorale — Mahler said the effect struck him like lightning, and he took the text as the basis of the last movement, adding lines of his own. The complete symphony was first performed in Berlin on 13 December 1895 under his own direction.