Wagner wrote the Ring librettos in reverse order, so that Das Rheingold was the last of the texts to be written; it was, however, the first to be set to music. The score was completed in 1854, but Wagner was unwilling to sanction its performance until the whole cycle was complete; he worked intermittently on this music until 1874. The 1869 Munich premiere of Das Rheingold was staged, much against Wagner's wishes, on the orders of his patron, King Ludwig II of Bavaria. Following its 1876 Bayreuth premiere, the Ring cycle was introduced into the worldwide repertory, with performances in all the main opera houses, in which it has remained a regular and popular fixture.
In his 1851 essay Opera and Drama, Wagner had set out new principles as to how music dramas should be constructed, under which the conventional forms of opera (arias, ensembles, choruses) were rejected. Rather than providing word-settings, the music would interpret the text emotionally, reflecting the feelings and moods behind the work, by using a system of recurring leitmotifs to represent people, ideas and situations. Das Rheingold was Wagner's first work that adopted these principles, and his most rigid adherence to them, despite a few deviations – the Rhinemaidens frequently sing in ensemble.
As the "preliminary evening" within the cycle, Das Rheingold gives the background to the events that drive the main dramas of the cycle. It recounts Alberich's theft of the Rhine gold after his renunciation of love; his fashioning of the all-powerful ring from the gold and his enslavement of the Nibelungs; Wotan's seizure of the gold and the ring, to pay his debt to the giants who have built his fortress Valhalla; Alberich's curse on the ring and its possessors; Erda's warning to Wotan to forsake the ring; the early manifestation of the curse's power after Wotan yields the ring to the giants; and the gods' uneasy entry into Valhalla, under the shadow of their impending doom.