Duke Bretislav I built the first fortress here around 1080, a wooden stronghold guarding the Thaya against raids from Austria. It was stormed and destroyed in 1140, then rebuilt in stone by the end of the century with a deep moat cut around it. King Ottokar I folded the rebuilt castle into the new royal town of Znojmo, tying it to the town walls and keeping a permanent garrison inside. The castle's military role faded after the seventeenth century: the emperor took back the ducal estate in 1710, then sold its front wing to the townspeople a decade later, who founded a brewery there that still trades as Hostan today. The rear wing became a Baroque chateau for the Lords of Deblín, and since 1910 the whole complex has served as a museum, its rooms kept as the Deblín family left them: a gentleman's salon with Oriental curios, an Empire music room with a Vienna-built piano, and the family's own chapel frescoed by Jan Michael Fissy.