Although much of the Commonwealth, including Warsaw, Kraków, and the western portions of the Grand Duchy, were taken by the Swedes, King John II Casimir and his allies were able to regain power after a few years starting with the Jasna Góra resistance and the Tyszowce Confederation. The Swedish defeat and eventual retreat from the territories of the Commonwealth spelled an abrupt end for the plans of Janusz and Bogusław. Janusz died in Tykocin, besieged by loyal Commonwealth forces (desperate Swedish defenders later blew themselves up).