When in 1408 Vytautas concluded his wars in the east with the Grand Duchy of Moscow, he was able to concentrate on the Teutonic Knights again. Samogitians rebelled for the second time in 1409. That led to a new war between Poland–Lithuania and the Knights, who were decisively defeated in the Battle of Grunwald in 1410. The Peace of Thorn (1411) changed borders determined by the Peace of Raciążek.