The decisive war with the Teutonic Knights (the Great War) was preceded in 1409 with a Samogitian uprising supported by Vytautas. Ultimately the Lithuanian–Polish alliance was able to defeat the Knights at the Battle of Grunwald on 15 July 1410, but the allied armies failed to take Marienburg, the Knights' fortress-capital. Nevertheless, the unprecedented total battlefield victory against the Knights permanently removed the threat that they had posed to Lithuania's existence for centuries. The Peace of Thorn (1411) allowed Lithuania to recover Samogotia, but only until the deaths of Jogaila and Vytautas, and the Knights had to pay a large monetary reparation.