Swedish invasion of Poland had catastrophic consequences for the hitherto prosperous province. The attackers, supported by their allies from Transylvania, seized whole Lesser Poland, reaching as far south as Nowy Targ, Nowy Sącz, and Żywiec. All major cities were looted and burned, and some of them, like Radom, did not recover until the 19th century. The Swedes captured and pillaged Sandomierz (where they destroyed the Royal Castle, and after the invasion, the city never recovered), Opoczno, Lublin, Kazimierz Dolny Pilzno, Szydlow, Szydłowiec, Tarnów, Kielce, Kraśnik, and Kraków. The invaders seized the capital of Lesser Poland after a short siege, and their occupation of the province was confirmed after their victories in the Battle of Wojnicz, and the Battle of Golab. In those years, one of the most important and symbolic events in the history of the nation took place in Lesser Poland. It was the Siege of Jasna Góra, which, according to some accounts, turned the course of the war. Furthermore, following the Treaty of Radnot, Lesser Poland was invaded in January 1657 by George II Rákóczi, whose troops caused more destruction. Foreign armies were not chased out of Lesser Poland until 1657, Kraków itself was recaptured on 18 August 1657. After these invasions, the province was ruined, with hundreds of villages, towns and cities burned. The population decreased (the urban population by nearly half), the peasantry starved, and like other parts of the Commonwealth, Lesser Poland was devastated. The period of peace lasted for about forty years, when in 1700, another major conflict, the Great Northern War began. Lesser Poland once again became a battleground, with Battle of Kliszów taking place there in 1702, and the Sandomierz Confederation formed in 1704.