The Great Northern War (1700–21) was a conflict in which a coalition led by the Tsardom of Russia successfully contested the supremacy of the Swedish Empire in Central, Northern, and Eastern Europe. Brunswick-Lüneburg (Hanover) joined the coalition in 1714 for Hanover and in 1717 for Britain, and Brandenburg-Prussia joined it in 1715. The war ended with Sweden's defeat, leaving Russia as the new dominant power in the Baltic region and as a new major force in European politics. The Western powers, Great Britain and France, became caught up in the separate War of the Spanish Succession (1702-1715), which broke out over the Bourbon Philip of Anjou's succession to the Spanish throne and a possible joining of France to Spain.
The initial leaders of the anti-Swedish alliance were Peter I of Russia, Frederick IV of Denmark–Norway and Augustus II the Strong of Saxony-Poland. Frederick IV and Augustus II were defeated by Sweden, under Charles XII, and forced out of the alliance in 1700 and 1706 respectively, but rejoined it in 1709 after the defeat of Charles XII at the battle of Poltava. The war ended with Sweden's defeat, leaving Russia as the new dominant power in the Baltic region and as a new major force in European politics. The formal conclusion of the Great Northern War came with a series of treaties, giving Russia the Baltic Provinces.
Charles XII led the Swedish army with Swedish allies that included Holstein-Gottorp, several Polish magnates under Stanislaw I Leszczynski (1704–10) and Cossacks under the Zaporizhian Hetman Ivan Mazepa (1708–10). The Ottoman Empire temporarily hosted Charles XII of Sweden and intervened against Peter I. The war began when an alliance of Denmark–Norway, Saxony, Poland and Russia sensed an opportunity as Sweden was ruled by the young Charles XII, and declared war on the Swedish Empire. After a series of back and forth battles, the campaign ended with the destruction of the main Swedish army at the decisive 1709 Battle of Poltava (an important trading center and military depot of Russia). The coalition members partitioned most of the Swedish dominions among themselves.