During the Second Silesian War, Hungarian troops and Pandurs again devastated the town. On 14 February 1745, Prussian troops under General Hans von Lehwaldt defeated the Austrian Habsburg forces of Georg Oliver von Wallis nearby. After the Silesian Wars, Habelschwerdt, together with the County of Kladsko and most of Silesia, came under Prussian rule according to the 1763 Treaty of Hubertusburg. In the War of the Bavarian Succession, skirmishers from Austrian army commanded by Dagobert Sigmund von Wurmser fought there against the Prussian garrison, and one of the blockhouses caught fire, resulting in the destruction of most of the town in mid-January 1779. During the Napoleonic Wars, the town was occupied by French forces and housed a garrison of the Grande Armée until 1813.