Szombathely in the 16th to 19th centuries
During the Ottoman occupation of Hungary, the Ottomans invaded the area twice, first in 1664, when they were defeated at the nearby town of Szentgotthárd. Nearly twenty years later, they invaded again in 1683, during the Battle of Vienna. The city walls protected Szombathely both times.
A peaceful period followed the retreat of the Turks until Prince Rákóczi's rebellion against the Habsburgs in the early 18th century. During the rebellion, the city residents supported the prince. The city was occupied by Habsburg armies in 1704, freed in November 1705, then occupied alternately by the two armies over the next years. In June 1710, more than 2,000 people died in a plague, and on May 3, 1716, the city was destroyed by a fire.
After such losses throughout the region, the Habsburg Crown recruited Germans to resettle the depopulated areas, particularly along the Danube River. They were valued for their farming abilities. The Crown allowed them to keep their language and religion. As a result, the city had a German majority for a long time. With increased population, the city began to prosper again. With the support of Ferenc Zichy, Bishop of Győr, a high school was built in 1772. The Diocese of Szombathely was founded in 1777 by Maria Theresa. The new bishop of Szombathely, János Szily, did much for the city: he had the ruins of the castle demolished and had new buildings constructed, including a cathedral, the episcopal palace complex, and a school (opened in 1793).
In 1809, Napoleon's armies occupied the city and held it for 110 days, following a short battle on the main square. In 1813, a cholera epidemic claimed many lives. In 1817, two-thirds of the city was destroyed by fire.
During the revolution in 1848–49, Szombathely supported the revolution. There were no battles in the immediate area because the city remained under Habsburg rule. The years after the Austro-Hungarian Compromise of 1867 brought prosperity. A railway line reached the city in 1865, and in the 1870s Szombathely became a major railway junction. In 1885 the city annexed the nearby villages Ó-Perint and Szentmárton and increased its area.
In the 1890s, when Gyula Éhen was the mayor, the city underwent significant infrastructure development: roads were paved, a sewage system built, and the tram line was built to connect the rail station, the downtown, and the Calvary Church. Private and public interests built the City Casino, the Grand Hotel (Kovács Szálló, later Hotel Savaria), and the area's first orphanage. In forty years, the population quadrupled.
During the mayoralty of Tóbiás Brenner, this prosperity continued. A museum, public bath, monasteries, and several new downtown mansions were built. A school of music and an orchestra were founded.