[1][2] Early in the Great Northern War, Charles XII of Sweden campaigned in the Polish–Lithuanian Commonwealth, where Augustus the Strong, Elector of Saxony, was king since 1697.
[3] Augustus' ally Peter the Great, tsar of Russia, was reluctant to engage Charles XII in a major battle as a consequence of the decisive defeat his army had suffered at Narva in 1700.
[3] A faction of the Polish and Lithuanian nobles did not accept Leszczyński's election,[3] which had been imposed in neglect of the commonwealth's customs, and organized in the Sandomir or Sandomierz Confederation in support of Augustus.
[1] The treaty further divided the commonwealth's territories then under Russian occupation among the parties: The areas of Smolensk and Kiev were to be re-integrated into Poland–Lithuania, while Polish Livonia and Courland were to be ceded to Sweden upon their reconquest.
[1] In early 1706, Augustus the Strong approached Warsaw with a cavalry force and ordered Johann Matthias von der Schulenburg to move the army assembled in Saxony into Poland–Lithuania.