The war ended with Stanisław's victory and the Treaty of Altranstädt in 1706 in which August II renounced his claims to the Polish throne.
At the onset of the Great Northern War, Augustus the Strong was king of Poland, Grand Duke of Lithuania and Elector of Saxony, having been elected in 1697.
[3] Swedish successes (in particular, the Battle of Klissow) led to a growing number of Polish-Lithuanian magnates switching sides, culminating in the formation of Warsaw Confederation on 16 February 1704 and the election of Swedish-endorsed voivode of Poznań, Stanisław I, as the new Polish king on 12 July 1704.
In early 1706 he approached Warsaw with a cavalry force and ordered Johann Matthias von der Schulenburg to move the army assembled in Saxony into Poland–Lithuania.
[17] Augustus position was backed up by the Russians, who would assume an increasingly dominating role in Polish internal politics following this conflict.