information:classification, linguistic:paraphrasing, structural:reformatting, quality:corruption
King of Poland for the first time

Following the death of Polish King John III Sobieski and having converted to Catholicism, Augustus won election as King of the Polish–Lithuanian Commonwealth in 1697 with the backing of Russia and Austria, which financed him through the banker Issachar Berend Lehmann. At the time, some questioned the legality of Augustus' elevation, since another candidate, François Louis, Prince of Conti, had received more votes. Each candidate, Conti and Augustus, was proclaimed as king by a different ecclesiastical authority: (the Primate Michał Stefan Radziejowski proclaimed Conti and the bishop of Kujawy, Stanisław Dąmbski proclaimed Augustus, with Jacob Heinrich von Flemming swearing to the pacta conventa as Augustus's proxy). However, Augustus hurried to the Commonwealth with a Saxon army, while Conti stayed in France for two months.

Although he had led the imperial troops against the Ottoman Empire in 1695 and 1696 without very much success, Augustus continued the war of the Holy League against Turkey, and during a campaign against the Ottomans, his Polish army defeated a Tatar expedition in the Battle of Podhajce in 1698. Unfortunately on 22 September a conflict between Polish and Saxon troops was narrowly avoided, causing the campaign to end. Victory at Podhajce had the political impact of forcing the Ottoman Empire to return Podolia and Kamieniec Podolski in Treaty of Karlowitz in 1699. An ambitious ruler, Augustus hoped to make the Polish throne hereditary within his family, and to use his resources as elector of Saxony to impose some order on the chaotic Polish–Lithuanian Commonwealth. He was, however, soon distracted from his internal reform projects by the possibility of external conquest. He formed an alliance with Frederick IV of Denmark and Peter I of Russia to strip the young King Charles XII of Sweden (Augustus' cousin) of his possessions. Poland's reward for participation in the Great Northern War was to have been Swedish Livonia. Charles proved an able military commander, however, quickly forcing the Danes out of the war and then driving back the Russians at Narva in 1700, thereby allowing him to focus on the struggle with Augustus. However, this war ultimately proved as disastrous for Sweden as for Poland.

Charles defeated Augustus' army at Riga in July 1701, forcing the Polish-Saxon army to withdraw from Livonia, and followed this up with an invasion of Poland. He captured Warsaw on 14 May 1702, defeated the Polish-Saxon army again at the Battle of Kliszów (July 1702), and took Kraków. He defeated another of Augustus' armies under the command of Generalfeldmarschall Adam Heinrich von Steinau at the Battle of Pułtusk in spring 1703, and besieged and captured Toruń.

By this time, Augustus was certainly ready for peace, but Charles felt that he would be more secure if he could establish someone with whom he had more influence on the Polish throne. In 1704 the Swedes installed Stanisław Leszczyński and tied the commonwealth to Sweden, which compelled Augustus to initiate military operations in Poland alongside Russia (an alliance was concluded in Narva in summer 1704). The resulting civil war in Poland (1704–1706) and the Grodno campaign (1705–1706) did not go well for Augustus. Following the Battle of Fraustadt, on 1 September 1706, Charles invaded Saxony, forcing Augustus to yield the Polish throne to Leszczyński by the Treaty of Altranstädt (October 1706).

Meanwhile, Russia's Tsar Peter had reformed his army, and he dealt a crippling defeat to the Swedes at the Battle of Poltava (1709). This spelled the end of the Swedish Empire and the rise of the Russian Empire.