Gregorio Allegri was born around 1582 in Rome. The earliest record we have of his career is when he joined the choir school at S. Luigi dei Francesi in Rome in 1591. He stayed there until 1596, when his soprano voice broke. We next hear of him on his return to S. Luigi in 1600 when he rejoined the choir as a contralto and began his musical studies with the maestro di cappella at S. Luigi, Giovanni Bernardino Nanino. About 1607 he left Rome to take up a post as singer and composer at the cathedral in Fermo at the outskirts of the papal state. He apparently stayed there until 1628, when he returned to Rome to take the competitive examination for admittance to the papal choir. He successfully completed the exam and became a part of the choir in 1629. In addition to the prestige of belonging to this organization, and the attendant guaranteed salary for life, Allegri enjoyed the opportunity to study and consult with some of the finest musical minds of his time.
During the next 23 years until his death on February 7, 1652, Allegri composed a number of masses, motets, and a small number of instrumental works, including a four-part sonata for string ensemble that might be considered an important early prototype string quartet, written as it was over a century before Haydn's first efforts in the form. Allegri's masterpiece, Miserere Mei, Deus, is a chant for five-part a cappella choir sung in the Sistine Chapel during Holy Week every year since it was composed sometime before 1638.