During the Seven Years' War Saxony was again invaded by Prussia and the Saxon army was invested by the Prussian army in the Siege of Pirna where they had to capitulate on 16 October 1756. Only four cavalry regiments and two Lancers formations, which were located in Poland, escaped the surrender. Frederick II of Prussia forced the Saxon regiments to swear an oath of allegiance to Prussia, which at least most of the officers refused. Ten infantry regiments and one battalion of Chevau-légers were provided with Prussian uniforms and placed in the hostile army. However, this was not successful because the majority of the troops deserted. From 1757, most of the "booty-regiments" dissolved, only three of which remained at war's end. The same year a Saxon corps under Prince Prince Francis Xavier of Saxony was raised in Hungary. After the war, Prince Francis Xavier as regent for the underage Elector Friedrich August III sought to reform the army to Prussian model, but failed because of the resistance of the estates because of high costs.