Sandomierz Confederation
The Sandomierz Confederation was an anti-Swedish confederation, formed on 20 May 1704 in defense of the King of Poland, August II the Strong. It was formed in reaction to the Warsaw Confederation, and its marshal was Stanisław Ernest Denhoff. The confederation lasted until 1717, when it was disbanded by the Silent Sejm. Members of the confederation mostly consisted of nobility from Lesser Poland, who supported the Kingdom of Saxony, whose ruler August II also was king of Poland. Its forming resulted in a three-year civil war between the two camps. In its initial stages, Swedish side  had the upper hand, and the Warsaw Confederation was eventually victorious in the civil war in Poland (1704-1706), which ended with the Treaty of Altranstädt (1706). Soon, however, after Swedish defeat in the Great Northern War, the Russians prevailed and August II resumed the Polish throne in 1709.