Austrians first began settling in Croatia as military personnel after[not in citation given] the Croatian nobles met in Cetin to electFerdinand I, Archduke of Austria as their king, and in return the Habsburgs would defend Croatia from the Ottoman invasion. This led to the creation of the Military Frontier (Vojna Krajina, German Militaergrenze) within Croatian territory which would be ruled directly from Vienna's military headquarters. This led to an increase of Austrian and other settlers and military elite within the Military Frontier. In 1815, the Habsburgs finally secured possession of Dalmatia and Istria after the fall of Venice. In time the Austrian elite began flocking to the Adriatic for holiday and sunbathing. Towns such as Opatija gained reputations as health resorts and became populated by mainly Austrian season-goers.