After further success in the engagements at Pultusk and Toruń, the Swedes proclaimed Stanisław Leszczyński king with the support of the Warsaw Confederation of Polish nobles. To oppose him, the Sandomierz Confederation was created by other nobles, in support of Augustus II, thus starting the Polish civil war of 1704–1706. Some smaller engagements at Poznań, Lwów, Warsaw and Poniec followed in 1704 as a consequence of Augustus II's attempts to restore the situation to his favour.