In 1492, Trachenberg was elevated to an autonomous state country of the Bohemian Crown. About 1555 the population turned Protestant. After a fire in 1579 a new castle with a tower was built and later upgraded under the rule of the House of Schaffgotsch, who had acquired the estates in 1592. During the Thirty Years' War, the owner Hans Ulrich von Schaffgotsch, a loyal supporter of the assassinated generalissimo Albrecht von Wallenstein was executed in 1635 and his estates seized by Emperor Ferdinand II. Trachenberg Castle was enfeoffed to the Imperial field marshal Count Melchior von Hatzfeldt in 1641. It was besieged several times and finally captured by the Swedish army under the command of General Lennart Torstensson in 1642. The Swedes occupied the castle until 1650. After the war, the area was subjected to stern Counter-Reformation measures. Another expansion of the castle took place in the years 1655-1657 on the initiative of Count Hatzfeld. In 1691, new fortifications were erected.