The castle, and originally the bishop’s court, was established earlier than the city, because around the mid-13th century. At that time, it was a wooden building with no defensive character. At the end of the thirteenth century, a brick castle was built, which in the fourteenth century was expanded and included in the system of urban fortifications. Around 1459, it was rebuilt by bishop Jodok Roźemberk, and in 1510 bishop Jan Thurzo erected a gate so that it would not be necessary to enter the city. After a fire that destroyed the city and the castle in 1524, Jakub von Salza and Marcin Gerstmann rebuilt it. At the turn of the 14th and 15th century, the bishops town and residence received a new line of walls, and in early modern times, new bastion fortifications. In the seventeenth / eighteenth century when more attention began to apply to residential values than defensive, old castle ceased to suffice. The bishops built a new palace, and the old castle became an economic base and lost its importance. Around 1824, part of the walls were demolished, and the remaining parts were incorporated in residential and commercial buildings.
In its late medieval form, the castle was a defensive site on the plan of an irregular rectangle with four houses along the walls, an inner courtyard and three towers of which the north and west were located in the corners, and the south next to the corner. All were located so that they could defend the castle from the side of the city, from where the road to the stronghold led to the beginning of the sixteenth century.
The castle has not survived to our times. The only remains of it are the relics of the castle mill embedded in 19th-century buildings and two four-sided towers: the southern one connected with a fragment of the perimeter wall and a slightly larger western one, expanded in the 16th century and transformed in the 19th century.
Leksykon zamków w Polsce, L.Kajzer, S.Kołodziejski, J.Salm, Warszawa 2003.