The Ottoman conquest of Bosnia and Herzegovina during the early years of the 16th century drove large numbers of ethnic Croats from their homes, which in the town of Klis prompted the formation of the "Uskok" military. Large numbers of fugitives from Bosnia and Serbia fleeing the Ottomans, joined the ranks of the Uskok bands. In 1522 the border territory of Senj was taken over by the Habsburgs under the authority of Archduke Ferdinand, forming a state-controlled Militärgrenze, or Military Frontier. The Austrian Emperor Ferdinand I instituted a system of planting colonies of defenders along the Military Frontier. Moreover, the Uskoks were promised an annual subsidy in return for their services. Owing to its location, Klis Fortress was an important defensive position which stands on the route by which the Ottomans could penetrate the mountain barrier separating the coastal lowlands from around Split in Croatia, from Ottoman-held Bosnia. Numerous refugees from Ottoman areas began settling along this territory, crossing the border to escape Ottoman attacks. Christian guerilla resistance in Ottoman-occupied areas of Dalmatia and Bosnia caused these people to flee and settle down, first at the fortress of Klis along the Military Frontier, then at Senj. A body of these "uskoks" led by Croatian captain Petar Kružić used the base at Klis both to hold the Turks at bay, and to engage in marauding and piracy against coastal shipping. Although nominally accepting the sovereignty of the Habsburg Emperor Ferdinand I, who obtained the Croatian crown in 1527, Kružić and his freebooting Uskoks were a law unto themselves.