Austrians first began settling in Croatia as military personnel after the Croatian nobles at the Parliament on Cetin elected Archduke Ferdinand I as their king on 1 January 1527, 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.