in today's Makarska, as its administrative centre. The doge of Venice Pietro I Candiano, whose Venetian fleet aimed to punish the piratesque activities of the town's vessels, was defeated here on September 18, 877 and had to pay tribute to the Narentines for the free passage of its ships on the Adriatic. Late Middle Ages The principality was annexed to the Kingdom of Croatia in the 12th century, and was conquered by the Republic of Venice a century later. Making use of the rivalry between the Croatian leaders and their power struggles (1324–1326), the Bosnian Ban Stjepan II Kotromanić annexed the Makarska coastal area. There were many changes of rulers here: from the Croatian and Bosnian feudal lords, to those from Zahumlje (later Herzegovina). In the eventful 15th century the Ottomans conquered the Balkans. In order to protect his territory from the Turks, Duke Stjepan Vukčić Kosača handed the region to the Venetians in 1452. The Makarska coastal area fell to the Turks in 1499. Under the Turks Under Ottoman rule, the town was surrounded with walls that had three towers. The name Makarska was cited for the first time in a 1502 document telling how nuns from Makarska were permitted to repair their church. The Turks had links with all parts of the Adriatic via Makarska and they therefore paid a great deal of attention to the port's maintenance. In 1568 they built a fortress as defence against the Venetians. During Turkish rule the seat of the administrative and judicial authority was in Foča, Mostar, for a short time in Makarska itself and finally in Gabela on the River Neretva. During the Candian War between Venice and the Turks (1645–1669), the desire among the people of the area to be free of the Turks intensified. In 1646, Venice recaptured the coastline. A period of dual leadership, marked with armed conflicts, destruction, and reprisals, lasted until 1684, until the danger of the Turks ended in 1699. Once more under the Venetians In 1695 Makarska became the seat of a bishopric and commercial activity came to life, but it was a neglected area and little attention was given to the education of its inhabitants. At the time when the people were fighting against the Turks, and Venice paid more attention to the people's demands. According to Alberto Fortis in his travel chronicles (18th century), Makarska was the only town in the