 Since 1199 the castle was part of Hungary.It is not exactly known when the castle was handed over to Frederick II, Duke of Austria, and how long it was his property; but in 1236 Béla IV of Hungary conquered the castle.Some years later (in 1260) he gave it to count Henry I Kőszegi.