The castle was built by King Aba Samuel in the years 1041-1044, but in fact, the roost already existed in the 10th century. In the period of the rule of the family Arpad, the New fortress - Ujvar, became the seat of the county in the year 1046. The Tatar - Mongolian siege was not successful to conquer the fortress.
After the year 1332, the castle lost its significance. The floor plan had trapezoid-oval shape.
The construction of the castle has been dated on the turn of the 10th and 11th centuries and in the 11th century Abaujvar was also the centre of the county and archdeaconate.
After the defeat of Omodej Aba after the battle at Rozhanovce, the castle was in hands of King Charles Robert who donated it to the family Drughet as a property honourable. The family members issued here the deeds, from the years 1330 – 1334 we know the castellan who also was a courtly judge of King Viliam Drughet. The last castellan is mentioned in the written documents in the year 1353. After this year, Abaujvar is mentioned only as property.
In the 14th and 15th centuries, the village Ujvar was in hands of the Perrine earls who made the king to permit the construction of the castle. However, the fortress was built in near Velka Ida in Slovakia in the years 1411 - 1414. After building of the new castle in Velka Ida, the village Ujvar became the property belonging to this fortress.