The Great Northern War (1700-21) was fought between Russia and Sweden for supremacy in the Baltic Sea. Initially, Russia joined the coalition in the war with Denmark and Saxony – composed of the so-called Northern Alliance, but after the outbreak of hostilities the Union collapsed, and was rebuilt in 1709. At various stages of the war other participants attended: on the side of Russia – Hanover, Holland, Prussia, the Polish-Lithuanian Commonwealth; on the side of Sweden – the Ottoman Empire, Zaporozhian Cossacks, and others. The war ended with the defeat of Sweden in 1721, leaving Russia dominant in the Baltic Sea and a major player in European politics. The war began as a coordinated attack on Sweden by the coalition in 1700 and ended in 1721 with the Treaty of Nystad and the Stockholm treaties.
The foreign interventions during the Time of Troubles resulted in Sweden's gains in the Treaty of Stolbovo (1617). The treaty deprived Russia of direct access to the Baltic Sea, meaning that the Russians were not in a position to challenge the Swedish regional hegemony. Russian fortunes reversed during the later half of the 17th century, notably with the rise to power of Peter the Great, who looked to address the earlier losses and re-establish a Baltic presence. In the late 1690s, the adventurer Johann Patkul managed to ally Russia with Denmark and Saxony by the Treaty of Preobrazhenskoye and in 1700 the three powers attacked.
Though able to mobilize 170,000 men, Russia was not able to put all in action at the same place. Furthermore, the Russian mobilization system was ineffective, and the expansive nation had to be defended everywhere—garrisons had to be supported and the war paid for. A great mobilization over vast territories would have been unrealistic. Peter the Great aimed to have an army with the same morale as the Swedish.
The Danes added 20,000 in their invasion against Holstein-Gottorp and several more against other fronts. Poland and Saxony together could mobilize at least 100,000 men.
After the dissipation of the first coalition through the peace of Travendal and the victory at Narva, the Swedish chancellor, Benedict Oxenstjerna, rightly regarded the universal bidding for the favor of Sweden by France and the maritime powers, then on the eve of the War of the Spanish Succession, as a golden opportunity of ending the war and making Charles the arbiter of Europe.
At that time, the representatives of Poland-Lithuania (which considered itself neutral despite its king's active participation in the anti-Swedish coalition) offered to serve as mediators between the Swedish king and Augustus. But Charles, intent on dethroning Augustus of Saxony from the Polish throne, attacked Poland, therefore ending the official neutrality of Poland-Lithuania. Five years later, on September 24, 1706, he concluded the Polish War through the treaty of Altranstadt, but, this treaty brought no advantage to Sweden, not even compensation for the expenses of six years of warfare. But he did attain his goal of dethroning August II and putting his ally Stanisław on the throne. Since he believed that Poles in general were not responsible he didn't do anything more. That has been regarded as a mistake since it became very easy for August II to retake the throne.
Even now Charles, by a stroke of the pen, could have recovered nearly everything he had lost. In 1707, Peter was ready to retrocede everything except Saint Petersburg and the line of the Neva, and again Charles preferred risking the whole to saving the greater part of his Baltic possessions. The year following, he invaded Russia, but was frustrated in Smolensk by Generalissimo Menshikov and headed to Ukraine for the winter. However, the abilities of his force were sapped by the cold weather and Peter's use of scorched earth tactics. When the campaign started again in the spring of 1709, a third of his force had been lost and he was crushingly defeated by a larger and better-fed Russian force under Peter in the Battle of Poltava, fleeing to the Ottoman Empire and spending five years in exile. Peter's victory shook all European courts. In just one day, Russia emerged as a major European power.
This shattering defeat did not end the war, although it decided it. Denmark and Saxony joined the war again and Augustus the Strong, through the crafty politics of Boris Kurakin, regained the Polish throne. Peter continued his campaigns in the Baltics, and eventually he built up a powerful navy. In 1710 the Russians captured Tallinn and Viipuri. In 1714, Peter's galley navy managed to capture a small detachment of the Swedish navy in the first Russian naval victory near Hanko peninsula.
The Russian army occupied Finland mostly in 1713-1714, Viipuri had been captured already in 1710. The last stand of the Finnish troops was in the battle of Napue in early 1714 in Isokyrö, Ostrobothnia. The occupation period of Finland in 1714-1721 is known as the Greater Wrath (isoviha). During the bloody occupation period thousands of Finns were killed or deported to Russia.
Over the next few years little changed, but a series of raids on Sweden itself demonstrated that there was little fight left, and soon Prussia, Hanover, and many smaller German states entered the war in the hope of gaining territory when peace was made. Eventually a series of massive seaborne invasions by combined Danish and Russian navies of the Swedish homeland forced the issue.
The war was finally concluded by the Treaty of Nystad between Russia and Sweden in Uusikaupunki in 1721. Sweden had lost almost all of its "overseas" holdings gained in the 17th century, and ceased to be a major power. Russia gained its Baltic territories, and became the greatest power in Eastern Europe. Prussia and Hanover, which made peace agreements with Sweden before Russia, gained territory from Sweden's German possessions. Sweden's dissatisfaction with the result would lead to its fruitless attempts at recovering the lost territories, such as Hats' Russian War, and Gustav III's Russian War.