keep paying tribute. Thanks to its strategic position, the city becomes part of a series of fortifications built against the Ottomans, and to be able of repelling the eventual attacks, the fortifications are enlarged again between 1661 and 1666, as well as a German garrison with artillery being assigned. However, after a series of attacks, the city is burned and suffers grave damage, but is eventually rebuilt by the year 1678. The city will once again come under fire during Francis II Rákóczi's uprising, and the city will be depopulated and left impoverished. The city will have a resurgence after Treaty of Szatmár is signed and the Károlyi family is elevated to the status of counts. Count Alexander Karolyi, shortly after the war, begins colonizing the region with Swabians, inviting 124 families from Württemberg. Eventually Slovaks, Jews, and Rusyns also get settled in the regions. The colonization efforts become more significant during Francis Károlyi tenure, an additional 132 families are settled in 1762, with the total number reaching an estimated 466 Swabian families, forming two districts in the town. Effects on cultural and social life began to show: in 1727 the Piarist Gymnasium was established, in 1754 the first typography was built, and in 1756 a pharmacy was opened. In 1780, the city became the seat of Szatmár County, and in 1828 the population reached 11,000. The town was hit by an earthquake in 1834, and the majority of the city was destroyed the next year during a great fire, which destroyed 350 houses. The city was hit by a similar great fire on 6 May 1887, causing similar damage to the fire from 1835. The rebuilding of the houses and the organizing of the streets were done according to the planning regulations adopted by the town's council, and they still define the physiognomy of the city's center today. In 1871, the railway connecting Carei to Satu Mare and Debrecen was opened, and it was further expanded in 1887 with the line Tășnad-Sărmășag-Zalău, and in 1905 the railway towards Mátészalka was built. Over the course of the 19th century, the colonized families started adopting the Hungarian language but kept their religion, differentiating them from the reformed majority of the county. In 1845, with help from count György Károlyi, a hospital was built and opened. With the new railway built in 1887, the light industry and the food industry in the