With the division of the Roman Empire, it became part of the Byzantine Empire. During the Middle Ages it was under South Slavic rule for a few centuries. In 1405 it became part of Republic of Venice and in 1571 part of Ottoman Empire.