The first wooden stronghold of Bolesław Śmiały stood at the top of the Koziejówka range in the 11th century. In the 14th century, it was reinforced with stones and walled in, destroyed in the 15th century, and abandoned. The castle on the neighbouring hill was built in the 14th century. It guarded the border and the trade route running along the Poprad to Hungary, and also housed a customs house. Until 1474, it was the seat of the starosts of the so-called Muszyna State, ruled by the bishops of Krakow. After the destruction during the invasion of the Hungarian king Matthias Corvinus, it was rebuilt on his order in the Renaissance style by master Alex of Bardejov. At that time, it was just a border watchtower. In the 17th century it burned down, and abandoned in the 18th century, fell into ruin. In the 19th century, some of the walls were blown up by treasure hunters. The castle stood on a natural defense hill with steep slopes. It was surrounded by a double stone wall with a narrow, long courtyard with a four-sided, buttressed gate tower. A rectangular courtyard with a deep well carved in the rock closed the starost's manor. From the side of the ridge, access was defended by a ditch with a drawbridge. The castle tower was most likely still standing in 1908.
Archaeological research has been carried out many times on the ruins. The defensive walls were secured in the form of a ruin, and there is a viewing point on the partially rebuilt tower. Opposite, you can see the earth embankment, which is the remains of the hillfort from the 11th century.
On the ruins in 1936, on a stone plinth, a statue of the Blessed Virgin Mary, known as Our Lady of Good Counsel, was placed. Today, it is the third one in this place and dates from 1992. May services are held here.
The ruins can be reached via a walking path in the Baszta Park, at which there are recreational gazebos, you can descend along the ridge of the hill next to the earthen garden.