The Magic Flute ideals of Sarastro's community and seeks to join it. Separately, then together, Tamino and Pamina undergo severe trials of initiation, which end in triumph, with the Queen and her cohorts vanquished. The earthy Papageno, who accompanies Tamino on his quest, fails the trials completely but is rewarded anyway with the hand of his ideal female companion Papagena. 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
Libretto of The Magic Flute to sublime human aspiration – in short from the circus to the temple, but never neglecting an opportunity for effective theater along the way. The sources for the work fall into (at least) four categories: works of literature, earlier productions of Schikaneder's theater company, Freemasonry, and the 18th-century tradition of popular theater in Vienna. The Schikaneder troupe prior to the premiere of "The Magic Flute" had developed considerable experience with performing fairy tale operas with similar plots, characters, and singers. Two bear a particularly strong relationship to "The Magic Flute": A very long tradition asserts that Freemasonry plays a major