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).