In 1775, Mozart held an unrewarding position in the Salzburg court. Mozart traveled widely with his mother, searching for a more prestigious position, but none materialized. While in Munich in 1781, he composed the opera, "Idomeneo." He later resigned from his post in Salzburg, taking up permanent residence in Vienna in the hopes of becoming a court composer. There he married Constanze Weber.
Mozart met with moderate success in Vienna. It was there that he composed the singspiel, "Die Entführung aus dem Serail," and the popular "Marriage of Figaro." The success of "Figaro" resulted in a commission for "Don Giovanni," composed in 1787. Also in that year, Mozart received an appointment to the Vienna court. The prestigious appointment did not solve Mozart's chronic financial problems. His prospects did not improve either, when the unsympathetic Leopold II ascended to the throne.
With his health deteriorating, Mozart composed the opera, "La Clemenza di Tito" for the new emperor's coronation.
Mozart died in Vienna in 1791 at the age of 35.