 In 1336 the counts of Güssing and Bernstein were defeated by the Hungarian King Charles Robert of Anjou, and the castle of Bernstein became part of the Hungarian Kingdom.In 1388 the castle was given to the Kanizsai family.In 1482 it became property of Matthias Corvinus of Hungary for a short time; in 1487 Hans von Königsberg received the castle from Emperor Frederick III.