The war ends in defeat for Wladyslaw.
He accedes on May 22, 1404, in the Treaty of Raciąż, to most of the Order's demands, including the formal cession of Samogitia, and agrees to support the Order's designs on Pskov; in return, Konrad von Jungingen undertakes to sell Poland the disputed Dobrzyń Land and the town of Złotoryja, once pawned to the Order by Wladyslaw Opolski, and to support Vytautas in a revived attempt on Novgorod.
Both sides have practical reasons for signing the treaty at this point: the Order needs time to fortify its newly acquired lands, the Poles and Lithuanians to deal with territorial challenges in the east and in Silesia.