In the wars following the French Revolution, the city was alternately occupied by French and Austrian forces, with the former ones destroying the city fortifications. In 1803, it lost the status of Imperial City and was absorbed into Bavaria. During the campaign of 1805, Napoleon managed to trap the invading Austrian army of General Mack and forced it to surrender in the Battle of Ulm. In 1810, Ulm was incorporated into the Kingdom of Württemberg and lost its districts on the other bank of the Danube, which came to be known as Neu-Ulm (New Ulm).