In this opera, the Queen of the Night persuades Prince Tamino to rescue her daughter Pamina from captivity under the high priest Sarastro; instead, he learns the high 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.