Perchtoldsdorf Castle probably was laid out before 1000 AD, part of a chain of fortifications along the eastern rim of the Vienna Woods. One Lord Heinricus de Pertoldesdorf was mentioned in an 1138 deed, during the Babenberg rule. Their Perchtoldsdorf vassals continued to rule from the castle even when the Babenberg dynasty became extinct in 1246.
The conflict between the Habsburg emperor Frederick III and his younger brother Archduke Albert VI of Austria started an unstable period in the region. In 1446, many homes in the town were burned during the invasion of the Hungarian regent John Hunyadi. During this time, the castle was occupied by various rival forces, including mercenaries of King Matthias Corvinus from 1477 until about 1490, when Frederick's son King Maximilian I re-established Habsburg control over the area. This turbulent period interrupted the construction of the tower house (Wehrturm), the town's landmark with a height of 60 metres. The tower and other fortifications permitted a successful defense of the city against the Ottoman troops during the 1529 Siege of Vienna, while the surrounding area was devastated.
References:Ogrodzieniec Castle is a ruined medieval castle originally built in the 14th–15th century by the W³odkowie Sulimczycy family. Established in the early 12th century, during the reign of Boles³aw III Wrymouth, the first stronghold was razed by the Tatars in 1241. In the mid-14th century a new gothic castle was built here to accommodate the Sulimczycy family. Surrounded by three high rocks, the castle was well integrated into the area. The defensive walls were built to close the circuit formed by the rocks, and a narrow opening between two of the rocks served as an entrance.
In 1470 the castle and lands were bought by the wealthy Cracovian townsmen, Ibram and Piotr Salomon. Then, Ogrodzieniec became the property of Jan Feliks Rzeszowski, the rector of Przemy¶l and the canon of Cracow. The owners of the castle about that time were also Jan and Andrzej Rzeszowskis, and later Pilecki and Che³miñski families. In 1523 the castle was bought by Jan Boner.