Answer
A peace treaty with Vladislaus Jagiellon was confirmed in 1478. The treaty was signed between the King of Poland and the Grand Duke of Lithuania, and it marked the end of the War of the Three Kings. The treaty gave Lithuania control over the Duchy of Samogitia, and it also established a border between the two countries.