Blasii from 1707 until 1708. Among the works Bach composed while living in the town was an elaborate, festive cantata, Gott ist mein König, BWV 71, for the inauguration of the new council in 1708. Internal dissensions and destruction caused during the Thirty Years' War (1618–1648) and the Seven Years' War (1756–1763) helped in bringing about Mühlhausen's decline. In addition, Leipzig's rise as a trade fair town and new long-distance trading routes like also contributed by decreasing the city's trade and damaging the finances of the city. The German mediatization led to the formal loss (that had de facto already occurred) of Mühlhausen's independence in 1803, as the city became part of Prussia. During the Napoleonic Wars it was part of the Kingdom of Westphalia from 1807 until 1815, when it became part of Prussia again according to the decisions of the Congress of Vienna. Since 1815 After 1815, Mühlhausen was part of the newly created Prussian Province of Saxony, where the Mühlhausen district was established. In 1831, the Mühlhausen-born civil engineer John A. Roebling, later constructor of the Brooklyn Bridge, emigrated to the United States. The era of industrialisation and urbanisation reached Mühlhausen relatively late, around 1870, when the city was connected to the railway by a line from Gotha to Leinefelde. In 1892, Mühlhausen became an independent city district. In 1898, the municipal power station was founded and the tramway network started its operation in Mühlhausen. Major industries were textiles and engineering. Between 1910 and 1917, the provincial hospital of Pfafferode was built on the western edge of the city, one of the largest hospitals in the Prussian Province of Saxony. The Great Depression after 1929 hit Mühlhausen very hard and led to massive unemployment. In 1935, the Nazi armament campaign resulted in the building of a large military complex with several barracks with the deliberate side effect of boosting the city's weak economy. The synagogue was damaged during the Kristallnacht in November 1938, but as one of only a few in Germany, it was not completely destroyed and still stands today. At the Pfafferode hospital, nearly 2,000 patients were killed or died during the Nazi period (Action T4), most of them were mentally or physically disabled. From 1944 to March 1945, a women's forced labour camp was located directly outside Mühlhausen (a branch of the Buchenwald camp), producing arms. The women were deported in April 1945 to