From then on the new castle was used by the territorial princes as an administrative centre for the Barony and District of Freistadt (including inter alia Leopoldschlag, Neumarkt, Schenkenfelden and Rainbach) and as the residence of the lord's Pfleger.
During the Hussite Wars and the numerous border feuds of the 15th century the castle acted as a strong bulwark at the edge of the town.
In the 16th century it was significantly remodelled, the plans for the rebuilding of the south wing in 1588 being drawn up by architects Antonio Cerisora, Ambrosio Solari and Mert Pogner.
This enabled residents of the castle to leave the town incognito, but the gate also posed a security risk, which is why it had been bricked up in the 15th century.
In 1584, Hans Christoph von Gera pressed for the opening of the gate by drawing attention to the lack of escape during the two great fires of 1507 and 1516.