In May 1409, an uprising started in Samogitia, which had been in Teutonic hands since the Peace of Raciąż of 1404. Grand Duke of Lithuania Vytautas supported the uprising. Poland, which had been in a personal union with Lithuania since 1386, also announced its support to the Samogitian cause. Thus the local uprising escalated into a regional war. The Teutonic Knights first invaded Poland, catching the Poles by surprise and capturing the Dobrzyń Land without much resistance. However, neither side was ready for a full-scale war and agreed to a truce mediated by Wenceslaus, King of the Romans in October 1409. When the truce expired in June 1410, allied Poland–Lithuania invaded Prussia and met the Teutonic Knights in the Battle of Grunwald. The Knights were soundly defeated, with most of their leadership killed. Following the battle, most Teutonic fortresses surrendered without resistance and the Knights were left with only eight strongholds. However, the allies delayed their Siege of Marienburg, giving the Knights enough time to organize defense. The Polish–Lithuanian army, suffering from lack of ammunition and low morale, failed to capture the Teutonic capital and returned home in September. The Knights quickly recaptured their fortresses that were taken by the Poles. Polish King Jogaila raised a fresh army and dealt another defeat to the Knights in the Battle of Koronowo in October 1410. Heinrich von Plauen, new Teutonic Grand Master, wanted to continue fighting and attempted to recruit new crusaders. However, the Teutonic Council preferred peace and both sides agreed to a truce, effective between 10 December 1410 and 11 January 1411. Three-day negotiations in Raciąż between Jogaila and von Plauen broke down and Teutonic Knights invaded Dobrzyń Land again. The incursion resulted in a new round of negotiations that ended with the Peace of Thorn signed on 1 February 1411.