The Captaincies of the Kingdom of Hungary (Hungarian: Magyar királyi főkapitányságok) were administrative divisions, military districts in the 16th and 17th centuries.
The Ottoman Empire meant a constant threat to the kingdom, therefore the Habsburg Hungarian kings needed to establish a well-working military administration.
[2] Irrespective of the military districts, there were coexistent superior (nemesi – noble) captaincies,[2] with their own captain-generals, however their role was different (organization of insurrectio, logistics etc.).
The Captaincy of Győr (also called Duna-Balaton Köz) was located mainly at the western parts of Kingdom of Hungary (the territories between lake Balaton and river Danube).
[8] The Captaincy of Lower Hungary (Alsó-Magyarországi[9] in Hungarian, also called Bányavárosok, Bányavidék and Dunán-innen[10]) was established in 1563 as Article of 16 of 1563 stipulated.
Its headquarter was in Nyitra (now Nitra), and later, in accordance with the military situation, in Surány (now Šurany) (from 1568 to 1581), Léva (now Levice) (from 1581 to 1589), Érsekújvár (now Nové Zámky) (from 1589 to 1663) and from 1663 in Komárom (Komárno).
Their attempt succeeded and the Ottomans were held there until Slavonia was returned to the Habsburg rule following Great Turkish War and Treaty of Karlowitz in 1699.