The Magic Flute (, ), K. 620, is an opera in two acts by Wolfgang Amadeus Mozart to a German libretto by Emanuel Schikaneder. The work is in the form of a Singspiel, a popular form during the time it was written that included both singing and spoken dialogue. The work premiered on 30 September 1791 at Schikaneder's theatre, the Freihaus-Theater auf der Wieden in Vienna, just two months before the composer's premature death. Still a staple of the opera repertory, its popularity was reflected by two immediate sequels, Peter Winter's Das Labyrinth oder Der Kampf mit den Elementen. Der Zauberflöte zweyter Theil (1798) and a fragmentary libretto by Johann Wolfgang von Goethe titled The Magic Flute Part Two. The allegorical plot was influenced by Schikaneder and Mozart's interest in Freemasonry and concerns the initiation of Prince Tamino. Enlisted by the Queen of the Night to rescue her daughter Pamina from the high priest Sarastro, Tamino comes to admire the high ideals of the latter and he and Pamina both join Sarastro's community, while the Queen and her allies are vanquished. Composition The opera was the culmination of a period of increasing involvement by Mozart with Schikaneder's theatrical troupe, which since 1789 had been the resident company at the Theater auf der Wieden. Mozart was a close friend of one of the singer-composers of the troupe, tenor Benedikt Schack (the first Tamino), and had contributed to the compositions of the troupe, which were often collaboratively written. Mozart's participation increased with his contributions to the 1790 collaborative opera Der Stein der Weisen (The Philosopher's Stone), including the duet ("Nun liebes Weibchen", K. 625/592a) among other passages. Like The Magic Flute, Der Stein der Weisen was a fairy-tale opera and can be considered a kind of precursor; it employed much the same cast in similar roles. The libretto for The Magic Flute, written by Schikaneder, is thought by scholars to be based on many sources. Some works of literature current in Vienna in Schikaneder's day that may have served as sources include the medieval romance Yvain by Chrétien de Troyes, the novel Life of Sethos by Jean Terrasson, and the essay "On the mysteries of the Egyptians" by Ignaz von Born. The libretto is also a natural continuation of a series of fairy tale operas produced at the time by Schikaneder's troupe, including an adaptation of Sophie Seyler's Singspiel Oberon as well