This border fortress in Otočac lies by the river of Gacka, and the part where the captain is located with most of his men is surrounded with walls with several towers. There is also the church of Saint Mary and the chapel of St Fabian and Sebastian. The rest of the unit and most inhabitants live outside the fortress, in clay-covered houses built on thick poles amid water. These houses are so beautifully arranged that they appear as a town with lanes and streets through which boats can pass. Houses are, however, not lined next to each other, but stand detached from one another, so that on needs a boat to get to his neighbour’s house.
J. W. Valvasor, Die Ehre der Herzogthmus Crain, 1689.

Otočac (4.373 inhabitants) is the seat of the Gacka area and the seat of township. It is one of the oldest towns with Croatian population. The first written records of the town date back to the end of the 11th century (1100) and the Baška Tablet, an inscribed stone tablet from the island of Krk which belongs among the earliest known monuments to Croatian literacy and culture. At that time, St. Nicholas Monastery in Otočac was affiliated with St. Lucy’s Convent in Baška on the island of Krk. However, historians believe that Otočac dates farther back than the 11th century and assume that Duke Borna probably had one of his seats in Otočac at the beginning of the 9th century. Otočac owes its name and its survival to a river island. Up until the 18th century Otočac was situated on a small natural island in the Gacka river. The island was surrounded with fortification walls and towers for protection and could be accessed only by boat. This made it invincible and throughout its long history Otočac was never a conquered town. Traces of early human habitation have been found locally. The hill forts in Umac and Vinica, and the nearby Zorišnjak near Staro Selo, testify to the settlements dating back to the Iapodic time. These hill forts are yet to be subject to detailed archaeological study.

The oldest preserved deed of donation regarding Otočac dates back to 1300, whereby King Charles II of Naples donated land and the town of Otočac to Doimus II, the Prince of Krk. The princes of Krk, later called the Frankopans, had the town fortified, they built churches and encouraged culture and literacy.  Throughout their almost three-centuries-long possession of these lands, the princes of Krk were resident in Otočac: Doimus II, Frederick III, Sigismund and Martin Frankopan. It was under Sigismund that Otočac saw a period of prosperity. On 5 March 1460, Pope Pius II founded the Otočac diocese and upgraded the collegiate church of St. Nicholas into a cathedral, with Otočac granted the civitas status  by a Papal Charter.

In 1619, the Military Frontier administration erected a fortress above Otočac called Fortica after the hill of the same name, thereby thwarting the Ottoman attempt to conquer Otočac and preventing their incursions to the coast and the town of Senj. Otočac began to develop outside the city walls in the middle of the 18th century after the Ottoman threat had finally subsided and Otočac became a regimental headquarters.  Thanks to Empress Maria Theresa the town was made into a trading station in 1746. The so-called trivial school was set up in Otočac as early as 1727 and since 1782 there has been a secondary school there. In 1870, a boy’s school was transformed to a state public school. In 1844, the Croatian army general Nikola Maštrović set up a theatre in the town, with performance held in German and Croatia. Founded in 1873, the public library, still in operation today, was supported by the great Croatian benefactor Josip Juraj Strossmayer, the bishop of the Đakovo and Srijem diocese.