Švanda the Bagpiper (Czech: Švanda dudák; also known with the German spelling as Schwanda the Bagpiper), written in 1926, is an opera in two acts (five scenes), with music by Jaromír Weinberger to a Czech libretto by Miloš Kareš, based on the drama Strakonický dudák aneb Hody divých žen (The Bagpiper of Strakonice) by Josef Kajetán Tyl. Its first performance was in Prague at the Czech National Opera on 27 April 1927. It premiered in German, with the translation by Max Brod, at Breslau on 16 December 1928. Other productions quickly followed:
At the time, the opera, with its use of Czech folk material, enjoyed considerable success, with translations into 17 languages. Since that time, the opera has fallen from the repertory, although in orchestral performances and recordings, the "Polka and Fugue" now together form a concert work that is heard more often than the opera itself.
It has been a week since Švanda and Dorota married. The robber Babinský takes refuge in their farmhouse, and immediately falls for Dorota. Babinský quickly convinces Švanda of the tedium of married life, and persuades him to go off on an adventure. They arrive at the Queen's court, where she is under the power of a wicked Magician. The Queen had made a deal with the Magician where she consented to the death of the Prince, her betrothed, in exchange for a heart of ice (and thus no human feeling) and a diamond scepter, symbolic of her power. Švanda plays his bagpipes, which breaks the spell. The Queen then offers herself to Švanda in marriage. Švanda accepts, kissing her, but then Dorota appears, which angers the Queen. The Queen, her heart now again of ice, has Švanda and Dorota imprisoned and Švanda condemned to death.
Babinský helps save Švanda by replacing the executioner's axe with a broom. Švanda plays his bagpipes again, enchanting the crowd gathered for the execution, and escapes with Dorota. Dorota herself is now angry at Švanda and questions his fidelity. Švanda retorts that if he ever kissed the Queen, may he go to Hell. Forgetting that he did kiss the Queen, Švanda immediately drops through the earth into Hell. Babinský then tells Dorota that he loves her, but she makes him promise to rescue Švanda.