The college suffered severe human and capital losses during the Swedish invasion of 1656 and the plague of 1710, but recovered. After the suppression of the Jesuits in 1773, the college's administration was taken over by the Commission of National Education. After the Third Partition of the Polish–Lithuanian Commonwealth, Carmelites from Kolainiai administered the school from 1797 to 1817. In 1817, Tsarist authorities secularized the school, changed its name to gymnasium, introduced primary education classes, and transferred its administration to Vilnius University. As such, the number of students grew and exceeded 400.