Mozart began the Requiem in late July 1791 on commission from an anonymous patron, who turned out to be Count Franz von Walsegg, a Viennese nobleman who intended to pass the work off as his own composition at a memorial for his late wife. Mozart was thirty-five, in declining health, and simultaneously finishing Die Zauberflöte and La Clemenza di Tito. He never completed the Requiem. He died on the fifth of December 1791, having written most of the Introitus, the Kyrie, and the Sequentia (six movements through the Lacrymosa), with sketches for the Offertorium and only fragments of the rest.
His widow, Constanze, urgently needed the commission's second-half payment to support herself and the two surviving children. She gave the unfinished manuscript to several of Mozart's circle in succession (Joseph Eybler attempted the completion first, gave up, returned it), and finally landed it with Franz Xaver Süssmayr, Mozart's pupil and assistant. Süssmayr completed the work by January 1792, drawing on the sketches Mozart had left, on his memory of conversations he and Mozart had had during composition, and on his own invention where the source material ran out. He delivered the manuscript signed with Mozart's forged name. Walsegg performed it on the anniversary of his wife's death and never knew the score was a posthumous patchwork.
The Süssmayr completion is the version performed today. Subsequent attempts to remove its interpolations and reconstruct the work closer to what Mozart may have intended (Beyer 1971, Maunder 1988, Levin 1993, Druce 2017) have circulated in scholarly circles but never replaced Süssmayr in concert practice. The reason is partly inertia, partly that Süssmayr knew Mozart's working method better than any modern reconstructor can. The reason is also that the Requiem we have works, as a coherent piece of music, in ways the cleaner reconstructions sometimes do not. Süssmayr's seams are visible to a trained ear in the Sanctus and the Agnus Dei; the work survives them.
The autograph manuscript, with Mozart's handwriting in the early movements and Süssmayr's hand taking over partway through the Sequentia, is held at the Austrian National Library in Vienna. The transition from one composer's notation to the other is visible to the naked eye on the page. It is one of the most poignant documents in Western music: a score where you can watch a great composer's hand stop, and an apprentice's hand pick up, and the music continue without interruption.

