who fought a war against sweden to expand russia's size
The war began when an alliance of Denmark -- Norway, Saxony, Poland and Russia, sensing an opportunity as Sweden was ruled by the young Charles XII, declared war on the Swedish Empire and launched a threefold attack on Swedish Holstein-Gottorp, Swedish Livonia, and Swedish Ingria. Sweden parried the Danish and Russian attacks at Travendal (August 1700) and Narva (November 1700) respectively, and in a counter-offensive pushed Augustus II's forces through the Polish -- Lithuanian Commonwealth to Saxony, dethroning Augustus on the way (September 1706) and forcing him to acknowledge defeat in the Treaty of Altranstädt (October 1706). The treaty also secured the extradition and execution of Johann Reinhold Patkul, architect of the alliance seven years earlier. Meanwhile the forces of Peter I had recovered from defeat at Narva and gained ground in Sweden's Baltic provinces, where they cemented Russian access to the Baltic Sea by founding Saint Petersburg in 1703. Charles XII moved from Saxony into Russia to confront Peter, but the campaign ended in 1709 with the destruction of the main Swedish army at the decisive Battle of Poltava (in present-day Ukraine) and Charles' exile in the Ottoman town of Bender. The Ottoman Empire defeated the Russian-Moldavian army in the Pruth River Campaign, but that peace treaty was in the end without great consequence to Russia's position.