In the 1630’s, Italian composer Gregorio Allegri wrote a composition for Easter week called the Miserere. Made for two choirs, one of five singers and the other of four, the 12 minute piece was so beautiful that the current Pope decreed that it could not be written down or performed anywhere other than the Sistine Chapel upon penalty of excommunication of the Church. Except for three performances, the ban lasted for more than a century. But then in 1770, a 14 year old music prodigy named Wolfgang Amadeus Mozart ended the ban.
Despite his youth, Mozart was already known all over Europe for his incredible compositions. By age 8, he had composed his first symphony, and over the course of his 36 years, he would go on to write over 600 pieces of music. So when he attended the first of the Miserere performances, he did what came to him naturally: he wrote the whole piece down after hearing it only once. Of course, there were some misplaced notes, but he easily corrected that after attending the second performance.
A year later, Mozart gave or sold his transcription to Charles Bruney, an English music historian, who then published it. The Church, now unable to reasonably prohibit the performance of the piece, lifted the ban. Pope Clement XIV was curious about this prodigy child, and he summoned him to the Vatican for a private meeting. Instead of excommunicating Mozart, he highly praised him, and even gave him a papal knighthood.
(via Now I Know)