The activities of both the grammar school and the seminary were stopped by the Polish–Swedish War. Already in late 1600 the forces of Charles IX of Sweden besieged the city defended by three banners of reiters and the city's burghers. Despite repeated assaults, the Swedes could not enter the city. Finally in 1601 Capt. Hermann Wrangel switched sides, assaulted the castellan and opened the gates for the Swedish forces. The town was retaken by Polish–Lithuanian Commonwealth on 13 April 1603 following a brief siege led by hetman Jan Karol Chodkiewicz; roughly 1000 Swedish soldiers surrendered and were escorted to Tallinn.