Pilsen was first mentioned as a castle in 976, as the scene of a battle between Duke Boleslaus II of Bohemia and Emperor Otto II. It became a town in 1295 when King Wenceslaus II granted Pilsen its civic charter and established a new town site, located some 10 km away from the original settlement, which is the current town of Starý Plzenec. It quickly became an important town on trade routes leading to Nuremberg and Regensburg; in the 14th century, it was the third-largest town in Bohemia after Prague and Kutná Hora. During the Hussite Wars, it was the centre of Catholic resistance to the Hussites: Prokop the Great unsuccessfully besieged it three times, and it joined the league of Romanist nobles against King George of Podebrady. In 1468, the town acquired a printing press; the Troyan Chronicle, the first book published in Bohemia, was printed on it. Emperor Rudolf II made Pilsen his seat from 1599-1600. During the Thirty Years’ War the town was taken by Mansfeld in 1618 after the Siege of Plzen and it was not recaptured by the Imperialists until 1621. Wallenstein made it his winter-quarters in 1633. The town was unsuccessfully besieged by the Swedes in 1637 and 1648. At the end of the 17th century, the architecture of Pilsen began to be influenced by the Baroque style. The historic city centre has been under historic preservation since 1989.