and would be revived as a Latin titular bishopric. Medieval period In the 9th century, it was in the Dyrrhachium theme, a military governorate of the Byzantine Empire. In 1010, Tsar Samuel of Bulgaria (r. 997-1014†) failed to conquer the town during the war against the Byzantines. By 1040, archon Stefan Vojislav of Duklja conquered the region. In 1183, Serbian Prince Stefan Nemanja conquered Olcinium and the town prospered as one of the most significant coastal towns. Ulcinj remained in Nemanjić hands in their Kingdom and Empire, and after the death of Emperor Dušan (r. 1331-1355†), the region, known as Lower Zeta, was under the supervision of gospodin Žarko, a voivode of Emperor Uroš the Weak until his death in 1360. Žarko's lands were then held by the Balšić family. Under Balšić control, Ulcinj continued to be an important town and also minted coins. The Balšić Tower in the upper part of the Old Town was built by the Balšić noble family in the late 14th century. Venetian and Ottoman rule In 1405 the Venetians conquered the town. Under Venetian control, the city was renamed Dulcigno in Italian, and it was incorporated in the Albania Veneta. The Venetians maintained control until 1571, when the Ottoman Turks conquered Dulcigno with the help of Barbary pirates, who didn't leave the town after conquering. It was renamed Ülgün and remained within the Ottoman domain for over 300 years, during which time its far-reaching reputation as a lair of pirates was established.According to historian Luigi Paulucci at the time of the Venetians the town was half Albanian, a quarter Venetian and one quarter Slavic. In the 17th century a self-proclaimed Jewish Messiah named Sabbatai Zevi caused turmoil throughout the Turkish Empire with his evangelizing, which attracted thousands of followers. He was eventually captured and exiled to Ulcinj in 1666, where he died quietly ten years later. He was buried in the courtyard of a Muslim house which is still preserved as a mausoleum; along with two Jewish altars in the Balšic Tower. In 1867, Ulcinj became a kaza of the İşkodra sanjak of Rumeli veyalet. After the Congress of Berlin in 1878, borders between Montenegro and the Ottoman Empire were redrawn, with Plav and Gusinje being ceded to Montenegro. But Muslim Albanian resistance prevented the Montenegrins from taking over Plav and Gusinje, so the Great Powers in 1880 decided to reverse the territorial transfer