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ń.