While it was under the leadership of Zürich, Winterthur's economic freedom was restricted. It lost many of its market rights and the right to trade in some goods. This ended in 1798, when Napoleonic troops took the town. On 27 May 1799, it was the site of the Battle of Winterthur between elements of the French Army of the Danube and elements of the Habsburg army, commanded by Friedrich, Baron von Hotze during the War of the Second Coalition, in the French Revolutionary Wars. Because Winterthur lies near Zürich and at the junction of seven roads, the army that held the town held the access to most of Switzerland and points crossing the Rhine into southern Germany. Although the forces involved were small, the ability of the Austrians to sustain an 11-hour assault against the French line, on the plateau north of Zürich, resulted in the consolidation of three Austrian forces. This led to the French defeat a few days later.