The opera was first performed by the "Nationalsingspiel" ("national Singspiel") which was sponsored by the Austrian emperor Joseph II. Mozart arrived in Vienna in 1781 and was looking for an opportunity to get a commission for an opera. He showed one of his operas ("Zaide") to the manager of the Nationalsingspiel. He was impressed and asked Mozart to write an opera for the company.