Гадячский договор
In 1659, the Swedish army still remaining in Poland under Lorens von der Linde was withdrawn to major Royal Prussian fortresses - Malbork, Głowa Gdańska, Grudziądz, Elbląg, and Brodnica. In August 1659, the Polish army captured Głowa and Grudziądz, and soon afterwards, the starving Swedish garrison at Brodnica surrendered. The siege of Malbork was continued, and Polish - Brandenburgian troops blocked Elbląg. In December 1659, the siege of Elbląg began. Meanwhile, in late 1658, the Polish–Russian truce ended when Russian forces under Ivan Andreyevich Khovansky (Tararui) and Jurij Aleksiejewicz Dołgorukow again attacked the Polish - Lithuanian units (see Russo-Polish War (1654–67)). The reason for the attack was the Treaty of Hadiach, which prepared the basis for a Polish–Lithuanian–Ruthenian Commonwealth. Muscovy was opposed to this newly established state, and decided to wage another war. The Russians managed to capture large parts of the Commonwealth, but were later defeated in the Battle of Konotop and the Battle of Polonka.