In 1771 Leopold and Wolfgang set out once more for Milan, arriving on 21 August. Wolfgang was to compose the serenata for the wedding of Archduke Ferdinand and Princess Beatrice. They shared their lodgings with violinists, a singing-master, and an oboist: a ménage that was, as Wolfgang wrote jestingly to Nannerl, "... delightful for composing, it gives you plenty of ideas!" Working at great speed, Wolfgang finished Ascanio in Alba just in time for the first rehearsal on 23 September.
The serenata was expected to be the lesser of the works for the wedding celebration, second to Hasse's opera Ruggiero. However, the 72-year-old Hasse was out of touch with current theatrical tastes, and although his opera was praised by the Dowager Empress Maria Theresa, its overall reception was lukewarm, especially compared to the triumphant success of Ascanio. Leopold expressed delight at this turn of events: "The archduke has recently ordered two copies", he wrote home. "All the noblemen and other people constantly address us in the street to congratulate Wolfgang. In short! I'm sorry, Wolfgang's Serenata has so crushed Hasse's opera that I can't describe it." Hasse was gracious about his eclipse, and is said to have remarked that the boy would cause all others to be forgotten.
The Mozarts were free to leave Milan early in November, but they stayed another month because Leopold hoped that Ascanio's success would lead to an appointment for Wolfgang from a royal patron. He apparently solicited Archduke Ferdinand on 30 November, and his request was passed on to the imperial court in Vienna. It is possible that Leopold's pushiness in Vienna over La finta semplice still rankled, or that word of his crowing over Hasse's failure had reached the Empress. For whatever reason, Maria Theresa's reply to the archduke was unequivocal, describing the Mozarts as "useless people" whose appointment would debase the royal service, and adding that "such people go around the world like beggars". Leopold never learned this letter's contents; by the time it reached Milan the Mozarts had left, disappointed but still hopeful. "The matter is not over; I can say that much", Leopold wrote as he and Wolfgang made their way home. They arrived in Salzburg on 15 December.