the town, and in 1586 Polish religious literature spread locally. The House of Griffins, which ruled Pomerania for centuries, died out in 1637. The territory was subsequently partitioned between Brandenburg-Prussia and Sweden. After the Peace of Westphalia (1648) and the Treaty of Stettin (1653), Stolp came under Brandenburgian control. In 1660, the Kashubian dialect was allowed to be taught, but only in religious studies. The Polish language in general, however, was experiencing very unfavourable conditions due to depopulation of the area in numerous wars and implied Germanization. After the Thirty Years' War, Stolp lost much of its former importance—despite the fact that Szczecin was then ruled by Sweden, the province's capital was situated not in the second-largest city of the region, but in the one closest to the former ducal residence—Stargard. However, the local economy stabilized. The constant dynamic development of the Kingdom of Prussia and good economic conditions saw the city develop. After the major state border changes (modern Vorpommern and Stettin joined the Prussian state after a conflict with Sweden) Stolp was only an administrative centre of the Kreis (district) within the Regierungsbezirk of Köslin (Koszalin). However, its geographical location led to rapid development, and in the 19th century, it was the second city of the province in terms of both population and industrialization. In 1769, Frederick II of Prussia established a military school in the city, according to Stanisław Salmonowicz its purpose was the Germanization of local Polish nobility. During the Napoleonic Wars, the city was taken by 1,500 Polish soldiers under the leadership of general Michał Sokolnicki in 1807. In 1815 Słupsk became one of the cities of the Province of Pomerania (1815–1945), in which it remained until 1945. In 1869 a railway from Danzig (Gdańsk) reached Stolp. During the 19th century, the city's boundaries were significantly extended towards the west and south. The new railway station was built about 1,000 metres from the old city. In 1901, the construction of a new city hall was completed, followed by a local administration building in 1903. In 1910 a tram line was opened. The football club Viktoria Stolp was formed in 1901. In 1914, before the First World War, Stolp had approximately 34,340 inhabitants. Interwar period Stolp was not directly affected by the fighting in the First World War. The trams did not operate during the war, returning to the streets in 1919. Demographic growth remained high,