On 31 October 1517, according to legend, Luther nailed his 95 theses against the selling of indulgences at the door of the All Saints', the Castle Church – an event taken as marking the beginning of the Protestant Reformation. The Anabaptist movement had one of its earliest homes in Wittenberg, when the Zwickau prophets moved there in late 1521, only to be suppressed by Luther when he returned from the Wartburg in spring 1522. The Capitulation of Wittenberg (1547) is the name given to the treaty by which John Frederick the Magnanimous was compelled to resign the electoral dignity and most of his territory to the Albertine branch of the House of Wettin.