In 1482 the male line of the Garai family died out, and King Matthias Corvinus donated the castle to the Szapolyai family.
En 1482 a liña masculina dos Garai extinguiuse e o rei Matías Corvino doou o castelo á familia Szapolyai.