Legend says the opera was based on a real-life incident that occurred in Vienna. In the 19th century, the opera was considered somewhat naughty, and was rarely performed. Modern critics however realize the music is some of Mozart's finest, and the opera is now frequently performed around the world.

The opera is set in Naples in the 18th century. Don Alfonso wagers two young soldiers that their sweethearts will prove unfaithful if given the chance. The men accept the bet. They tell their sweethearts that they have been called to the front and leave Naples.

They return however as turban-clad, moustache-wearing "Albanians" to woo each other's sweetheart. With the conniving of Despina, the two sisters consent to marry the foreigners. At the last moment, the men remove their disguises, and rebuke their faithless sweethearts.