Source wikipedia.org
The town of Karlobag is first mentioned in 1387, as "Bag", founded by the Holy Roman Emperor Charles IV, Holy Roman Emperor in the 14th century, and is thus named after him (Karlo being the Croatian variant of Charles.) It has such strong connections with the interior that its town centre is completely different from other Mediterranean settlements.
Pliny and Ptolemy mentioned it as the Roman "Vegia". During migration period Vegia collapsed, but in the 7th century the Croats built a new settlement to the west of the Roman town, called Skrisa (Opidum Scrissi) which was later known as Bag, the seat of the noble Tugomirić family, then of Gusić-Kurjaković and Mogorović-Disislavić families.
Kurjaković, the duke of Krbav, took over Bag in 1322 and on November 2, 1387. gave Bag the status of a city. At the end of the XV. century, Bag fell under the rule of King Matthias Corvinus, and in 1493 it fell under the rule of Ivan Karlović Krbavski.
The Turkish invasion of Lika completely changed the course of this town's development. In 1525 it was completely destroyed by the Turks, leaving only a fortress with a small military presence. While Venice was considering whether to completely abandon or rebuild the town, the people of Senj turned to the Austrian Archduke Karl (the founder of the "Vojna Krajina", the military border area) and he built a new town in 1579, which, from 1580 on became known as Karlobag. However, just as the town had been restored (1592) the Venetians took over the fortress and destroyed the town. Right up until 1683 Karlobag was inhabited only by military units.
Another Habsburg ruler (also called Karl) was responsible for Karlobag's further development, the last male member of the family and father of Maria Theresa, Charles VI. His interest in this town was the result of his so-called "Adriatic orientation", for before him Austria had shown little interest in the Adriatic. He has a harbour built and planned a road to Gospić. His grandson Joseph II joined Karlobag to the "Vojna Krajina" in 1776 and in 1786 built another road over Velebit. During Napoleon's rule, Karlobag also suffered shelling from English warships, in 1813.
Until 1918, Karlobag (named Carlobago before 1850, later Karlopago) was part of the (Kingdom of Croatia-Slavonia after the compromise of 1867), in the Croatian Military Frontier, Likaner Regiment N°I.