The Symphony No. 4 in G major by Gustav Mahler was composed from 1899 to 1900, though it incorporates a song originally written in 1892. That song, ("The Heavenly Life"), presents a child's vision of heaven and is sung by a soprano in the symphony's Finale. Both smaller in orchestration and shorter in length than Mahler's earlier symphonies, the Fourth Symphony was initially planned to be in six movements, alternating between three instrumental and three vocal movements. The symphony's final form—begun in July 1899 at Bad Aussee and completed in August 1900 at Maiernigg—retains only one vocal movement (the Finale) and is in four movements: (sonata form); (scherzo and trio); (double theme and variations); and (strophic variations).

The premiere was performed in Munich on 25 November 1901 by the composer and the Kaim Orchestra, but it was met with negative audience and critical reception over the work's confusing intentions and perceived inferiority to the more well-received Second Symphony. The premiere was followed by a German tour, a 1901 Berlin premiere, and a 1902 Vienna premiere, which were met with near-unanimous condemnation of the symphony. Mahler conducted further performances of the symphony, sometimes to warm receptions, and the work received its American and British premieres in 1904 and 1905. The symphony's first edition was published in 1902, but Mahler made several more revisions up until 1911. After Mahler's death, the symphony continued to receive performances under conductors such as Willem Mengelberg and Bruno Walter, and its first recording is a 1930 Japanese rendition conducted by Hidemaro Konoye that is also the first electrical recording of any Mahler symphony. The musicologist Donald Mitchell believed the Fourth and its accessibility were largely responsible for the post-war rise in Mahler's popularity.

The symphony uses cyclic form throughout its structure, such as in the anticipations of the Finale's main theme in the previous three movements. The first movement has been characterized as neoclassical in style, save for its complex development section. The second movement consists of scherzos depicting Death at his fiddle, which are contrasted with Ländler-like trios. The third movement's two themes are varied alternately before reaching a triple forte coda, and the Finale comprises verses from sung in strophes that are separated by refrains of the first movement's opening. Certain themes and motifs in the Fourth Symphony are also found in Mahler's Second, Third, and Fifth Symphonies.

History Composition Gustav Mahler's Fourth Symphony is the last of the composer's three symphonies (the others being his Second and Third Symphonies). These works incorporated themes originating in Mahler's (The Boy's Magic Horn), a song cycle setting poems from the folk poetry collection of the same name. The core of the Fourth Symphony is an earlier song, ("The Heavenly Life"), set to text from but not included in Mahler's song cycle. Mahler considered the song both the inspiration and goal of the Fourth Symphony, calling it the "tapering spire of the edifice." Fragments of it are heard in the first three movements before it is sung in its entirety by a solo soprano in the fourth movement.

Mahler completed in 1892, as part of a collection of five (Humoresques) for voice and orchestra. He adapted the text of from the original Bavarian folk song ("Heaven is Hung with Violins" or "The World through Rose-colored Glasses") in . The poem describes scenes and characters from a child's vision of heaven. In 1895, Mahler considered using the song as the sixth and final movement of his Third Symphony. While remnants of can be found in the Third Symphony's first, fourth, and fifth movements—including a quotation of the song in the fifth movement's ("Three Angels were Singing")—Mahler eventually decided to withdraw the song from the work. He instead opted to use the song as the finale of a new symphony, his Fourth. Consequently, there are particularly strong thematic and programmatic connections between the Third and the Fourth through , though the composer also realized that the Fourth was closely related to his First and Second Symphonies. In conversation with Natalie Bauer-Lechner in the summer of 1900, Mahler described the Fourth Symphony as the conclusion to the "perfectly self-contained tetralogy" of his first four symphonies: she later expanded on this to suggest that the First depicts heroic suffering and triumph; the Second explores death and resurrection; the Third contemplates existence and God; and the Fourth, as an extension of the Third's ideas, explores life in heaven.

According to Paul Bekker's 1921 synopsis of the symphony, Mahler made an early program sketch titled that has the following six-movement form:

The sketch indicates that Mahler originally planned for the Fourth Symphony to have three purely symphonic movements (first, third, and fifth) and three orchestra songs: (composed as a song), (completed in 1895 as the Third Symphony's ), and . However, the symphony would be modified until only the program sketch's first and last movements would be realized as their respective movements in the symphony's final form, resulting in a Fourth Symphony of normal symphonic length (around 45 minutes) as opposed to the composer's significantly longer earlier symphonies.

During Mahler's 1899 summer vacation in Bad Aussee, the Fourth Symphony, in Bauer-Lechner's words, "fell into his lap just in the nick of time" in late July. The vacation served as Mahler's only chance during the entire year when he was free to compose, but his productivity heretofore was hindered by poor weather and listening to what he called "ghastly health-resort music". As the vacation neared its end, Mahler worked on the symphony for ten days, during which he drafted "about half" of the three instrumental movements and sketched the variations of the Adagio third movement, according to Bauer-Lechner. Mahler finished the Fourth during his summer vacation in Maiernigg the next year; following another bout of unproductivity that summer, Mahler eventually found his working rhythm and completed the symphony's (first full orchestral score) on 5 August 1900. The symphony's completion suddenly left Mahler feeling "empty and depressed because life has lost all meaning", and Bauer-Lechner reports that he was "deeply upset to have lost such an important part of his life" composing the work.

Later that year during the Christmas holidays, Mahler revised the Scherzo second movement, finalizing its orchestration on 5 January 1901. Though Mahler published his programs for the First and Second symphonies, he refrained from publishing a program for the Fourth. In the words of the musicologist James L. Zychowicz, Mahler intended for "the music to exist on its own." Mahler was also opposed to giving any titles for the symphony's movements, despite having "devised some marvelous ones", because he did not want critics and audiences to "misunderstand and distort them in the worst possible way."

Premiere During the first half of 1901, Richard Strauss considered conducting the first complete performance of Mahler's Third Symphony. However, Strauss, unsure whether he had enough time to prepare the Third's premiere, wrote to Mahler on 3 July asking whether he could conduct the Fourth's premiere instead. Mahler responded that he had already promised the premiere to Munich, "where the Kaim Orchestra and the Odeon are having such a tug-of-war over it that I'm finding it hard to try to choose between them". The Vienna Philharmonic had also asked Mahler several times whether they could perform the symphony's premiere, but Mahler by then had promised the premiere to Felix Weingartner, head of the Kaim Orchestra. Not long after the exchanges with the Philharmonic, the composer asked for Weingartner's permission sometime in August or September 1901 to conduct the premiere himself, citing his anxiety over the symphony and its performance.

Eventually, it was planned for Mahler to conduct the Kaim Orchestra in Munich for the world premiere, after which Weingartner and the Kaim Orchestra would perform the work on tour in various German cities and Mahler himself would conduct another performance in Berlin. To review the symphony's orchestration before its publication, Mahler arranged a reading rehearsal with the Vienna Philharmonic on 12 October, which doubled as a rehearsal of the Vienna premiere scheduled for January the next year. Mahler was not satisfied with the results; he made corrections to the score and fully rehearsed the work four times before the symphony's premiere. Though the Munich premiere was originally planned for 18 November, Mahler requested in late October that Weingartner postpone the performance to 25 November, citing "insurmountable difficulties". He also opposed programming a vocal work to precede the symphony on the premiere's program, as he wanted the Finale's soprano "to come as a complete surprise". Henry-Louis de La Grange writes: "the Fourth Symphony had cost Mahler more toil and anguish than the monumental symphonies that had preceded it, and, notwithstanding he was apprehensive of the reactions of its first audience, he secretly hoped that its modest dimensions and the clarity of its style would finally win him the approval of both the public and the musicians".

The world premiere of the symphony was performed on 25 November 1901 in Munich at the Kaim-Saal, with Mahler conducting the Kaim Orchestra and soprano Margarete Michalek Bauer-Lechner writes that the first movement was met with both applause and boos since a number in the audience were "unable to follow the complexity of events in the development". The Scherzo proved more confusing to the audience and received further vocal derision. Michalek's performance in the Finale "saved the day"; her youth and charm was said to have "poured oil on the troubled waters". Despite this, the premiere left many in the audience incensed, as the Munich press reported. The , though praising the first movement, described the symphony as "not readily accessible and, in any case, impossible to judge after only one hearing". It also criticized the work's "pretensions" and unjustified use of "the grotesquely comic" before accusing it of "[trespassing] against the Holy Spirit of music". The and the both expressed disappointment when comparing Mahler's Fourth to what they considered his superior Second Symphony; the former described the Fourth to be a "succession of disjointed and heterogeneous atmospheres and expressions mixed with instrumental quirks and affectations" while the latter said the work was full of "incredible cacophony". Likewise, claimed that "the bad seeds" in parts of the Second grew into "immense spiky thistles" in the Fourth. The symphony did find some praise in the —which lauded the Finale as "quite simply a work of genius" despite calling the whole work "transparent, sensitive, almost hysterical"—and the , which hailed the symphony as "great step forward on the road to artistic clarity".

Subsequent performances and reception