Having composed his first opera at the age of 16, Lotti was appointed organist at St. Mark's Cathedral in Venice nine years later. During a visit to that city in 1712, the Crown Prince of Saxony was so impressed with the young composer that he invited him to Dresden, which Lotti visited for two years in 1717-19. In 1733 Lotti defeated Porpora in a competition for the prestigious post of maestro di cappella at St. Mark's. A first-rate composer in the old style, Lotti's music is also sprinkled with modern harmonies. Lotti composed Masses, hymns, Psalms, and 17 operas. His music was admired by Hasse as well as his pupils Zelenka and Marcello.