Russo - Swedish War ( 1656 – 58 ) The Russo - Swedish War of 1656 – 1658 was fought by Russia and Sweden as a theater of the Second Northern War . It took place during a pause in the contemporary Russo - Polish War ( 1654 - 1667 ) as a consequence of the Truce of Vilna . Despite initial successes , Tsar Alexis of Russia failed to secure his principal objective — to revise the Treaty of Stolbovo , which had stripped Russia of the Baltic coast at the close of the Ingrian War . Background . When Charles X of Sweden invaded Poland , captured Warsaw and announced his claims on the Russian conquests in the orbit of the Grand Duchy of Lithuania , Afanasy Ordin - Nashchokin ( who led Russian diplomacy at the time ) decided it was an opportune time to suspend hostilities against the weakened Polish - Lithuanian Commonwealth and to attack the rear of the Swedish Empire instead . To that end he opened negotiations and concluded a truce with Poland in summer 1656 ( the Truce of Vilna , also known as the Truce of Niemież ) , a move which enraged a major ally of Russia , Ukrainian hetman Bogdan Khmelnytsky who maintained good relations with Sweden and was fighting against Poland . Campaigns . In July , a reserve force of the Russian army struck across Swedish Ingria and overran two key Baltic fortresses — Nöteborg and Nyen . A separate detachment advanced on Dorpat ( Tartu ) , which fell in October . The main forces marched along the bank of the Western Dvina towards Riga , taking Daugavpils ( see Siege of Dyneburg ) and Koknese ( see Storm of Kokenhusen ) on their way . By the end of August , the capital of Livonia was besieged and bombarded . As Russia had no full - fledged navy to intercept reinforcements coming to the Swedish garrison across the Baltic , Riga managed to hold out until October , when foreign officers commanding a small Russian flotilla defected to the other side and the Russians had to lift the siege . In the aftermath of this reverse , the Swedes recaptured much of Ingria , took the Pskov Monastery of the Caves and inflicted a heavy defeat on the Russian general Matvey Sheremetev at Walk ( Valga ) in 1657 . Conclusion . By the end of 1658 , Denmark was knocked out of the Northern Wars and the Ukrainian Cossacks under Khmelnytskyi ' s successor , Ivan Vyhovsky , allied themselves with Poland , changing the international situation drastically and inducing the tsar to resume the war against Poland as soon as possible . Under such circumstances , it was necessary to bring the Swedish adventure to a speedy end . On 20 December Ordin - Nashchokin negotiated with Sweden the Treaty of Valiesar ( Vallisaare ) , whereby Russia was allowed to keep the conquered territories in present - day Latvia and Estonia — Koknese , Aluksne , Dorpat , Nyslott — for three years . When the term expired , Russia ' s military position in the Polish war had deteriorated to such a point that the tsar could not allow himself to be involved into a new conflict against powerful Sweden . His boyars had no other choice but to sign in 1661 the Treaty of Kardis ( Kärde ) , which obliged Russia to yield its Livonian and Ingrian conquests to Sweden , confirming the provisions of the Treaty of Stolbovo . This settlement was observed until the Great Northern War broke out in 1700 .