The castle of Ajnácskő is located on the Felvidék aka Upper Hungary/Horná Zem/, now it is in Slovakia. (Hajnácka, Pirsenstein) It is in Gömör County, right at the present Hungarian-Slovakian border, not far from Rimaszombat and Fülek. Its name is coming from the Hungarian name Ajnács (the name allegedly has a Turkish origin, ‘ojnas’ and it stands for “flirtatious” in English but it is not proven yet). Legend says that the Hungarian home-taker chief called Huba gave the castle to his daughter, Hajnácska in the 9th century. Its castle was built after the Mongolian invasion by Bata and was first mentioned in 1247.
It was owned by the Szécsényi family in 1424 when King Zsigmond of Hungary took it away from them because its lord, Miklós of Salgó, was forging money in it. The king gave the castle to his queen, Borbála of Cillei. It was a center of a small dominium and 15 villages belonged to it in the 15th century. Later the Pálóczy family got the castle but the Hussites took it in the 1450s. When they were driven out, the Pálóczy family was restored into it. The last of the Pálóczy family member, Antal, died in the Battle of Mohács in 1526 so the castle went to the robber knight Ferenc Bebek. Menyhért Balassa owned it after him, but in the 1540s the castle changed hands rapidly: the Kubinyi and the Feledy families also owned it.
The Turks threatened the area with constant raids and they could take the castle for a full year in 1546. Later the castle was guarded by the king’s men but after the fall of Fülek castle (1554), their situation has become serious. Pasha Arslan of Buda set out in 1566 to take the castle of Palota. He laid a siege on Ajnácskő castle just to divert the attention from his real target. The Turks quickly took the small castle then. They could even keep it according to the Treaty of Drinapolis in 1568, along with Putnok castle. When Kristóf Teuffenbach and Miklós Pálffy were launching their campaign against the Ottoman castles in Upper Hungary in 1593, they took back Fülek and Ajnácskő, too. The castle went to the Lórántffy family.
When Fülek opened its gate before Ferenc Rhédey, the general of Prince Bocskai in 1605, Ajnácskő followed suit. Later the Lórántffy and the Vécsey families divided the castle between them. The castle changed lords again, the Kubinyi and the Széchy families owned it in the following years. King Habsburg Ferdinand II gifted it to Tamás Bosnyák, the captain of Fülek, in 1628. Later, it was not considered as an important Borderland castle anymore. Maybe that was why the Turks could take it by assaulting it in 1645. They had been using it as a center for raiding the area for four years. When captain György Fekete set out to take it with a strong Christian army, Bey Hassan didn’t wait for him but had the castle exploded and put the village on fire and fled in 1649. The Hungarians had it restored a little and garrisoned it.
The small castle was given to Sándor Vécsey and the following villages belonged to it: Ajnácskő, Feled, Gesztete, Kerekgede, Csoma, Majom, Jelene, Cserencsény, Alsó and Felsőpokorágy, Rimabrézó, Likér, Rimoca, Szelce, and Rimabánya. We know of a letter of the peasants from 1681 when they complained to their lord because they were forced to carry heavy sacks to the castle. Sándor Vécsey took part with his soldiers in an action against the Turks of Eger in 1687. The castle burned down in 1703 and its garrison joined the troops of Prince Ferenc Rákóczi.
See more pictures here: https://www.facebook.com/pg/hungarianturkishwars/photos/?tab=album&album_id=1156315571084477