As a result of the First Partition of Poland, in 1772, Brody became a part of Habsburg Empire (from 1804 the Austrian Empire). During the Austro-Polish War (part of Polish national liberation fights), on May 27, 1809, the city was captured by Poles without a fight. In 1812, Wincenty Potocki was forced by the Austrian government to remove the city's fortifications. In 1817 a secondary school ("Realschule") was founded in Brody, transformed in 1865 into a gymnasium. After the liberalization of Austrian policies in the Austrian Partition of Poland, after 1904 German was gradually replaced by Polish at this school.