Wieluń prospered in the 16th century, the so-called Polish Golden Age. It was a royal city of Poland and capital of the Land of Wieluń, part of the Sieradz Voivodeship in the Greater Poland Province of the Polish Crown. The town was devastated in the War of the Polish Succession, as the Battle of Byczyna took place near Wieluń. Good times ended in the catastrophic Swedish invasion (1655–1660), when the town was ransacked and burned both by the Swedish invaders, and by Polish troops, who took revenge on its Protestant residents for their support of the Lutheran Swedes. Finally, in 1707–1711, Wieluń's population was decimated by a plague (see miasma theory), which killed 2,000. Following the Second Partition of Poland in 1793, Wieluń briefly belonged to the Kingdom of Prussia, in 1807 it became part of the newly formed, but short-lived, Polish Duchy of Warsaw, and in 1815 it became part of Russian-controlled Congress Poland, where it remained until World War I. The town burned twice (1791, 1858), and after the second fire, it was rebuilt in a new shape. After World War I, Poland regained independence in 1918, and in the interbellum Wieluń was a county seat in the Łódź Voivodeship.