The Great Northern War was the war fought between a coalition of Denmark–Norway, Russia and Saxony-Poland (from 1715 also Prussia and Hanover) on one side and Sweden on the other side from 1700 to 1721. It started by a coordinated attack on Sweden by the coalition in 1700, and ended 1721 with the conclusion of the Treaty of Nystad, and the Stockholm Treaties. As a result of the war, Russia supplanted Sweden as the dominant power on the shores of the Baltic Sea, becoming a major player in European politics. Setting the stage for war Between 1561 and 1658, Sweden fought a series of wars in the Baltic, establishing an empire. During this period Sweden had occupied the Danish provinces of Skåne, Blekinge and Halland and the Norwegian provinces of Jämtland, Härjedalen, Trøndelag and Bohuslän. For Denmark, even more than the loss of territory, the continuous Swedish interference in Holstein (supporting claims for lands in Danish held Schleswig) was a major bone of contention. In the late 1690s Russia, who had also lost territory to Sweden, allied with Denmark–Norway, together with the duke of Saxony, who expected a reconquest of territory lost by his kingdom, Poland, to strengthen his domestic position. When the young Charles XII ascended Sweden's throne in 1697, the opportunity appeared ripe for recapturing lost territory. Battle of Narva In 1700 the three powers attacked and for Sweden the difficulty of a three front war had to be faced. No one expected what followed. The early part of the war consisted of a continual string of Swedish victories under Charles XII. Denmark was defeated in the summer of 1700 and withdrew until 1709. Russia suffered a defeat in the Battle of Narva in November, but regained the offensive and the city of St. Petersburg was founded between 1703 and 1707. Then Charles XII defeated Augustus the Strong in 1706-07, temporarily deposing him from the Polish throne. In Norway Frederick IV of Denmark distrusted the nobility and gentry and surrounded himself with ministers and advisers of humble origin. The one exception was the king's half-brother, Ulrich Christian Gyldenløve, who at the age of 24 was General-Admiral and Commander in Chief of the Navy. Frederick toured Norway in 1704 to assess the condition of his army and his second kingdom. In the morning, at the noon stop, and in the evenings the king held audiences with all who wanted