In the Early Middle Ages,
Antivari () remained a subject of the
Byzantine Empire, as part of the
Theme of Dyrrhacium.
Stefan Vojislav, incorporated it into his state in 1040, and his family till 1090, after which it became part of the medieval Serbian state culminating in the
Empire under the
Nemanjić dynasty. It was briefly annexed by the
Republic of Venice, until
Louis I of Hungary forced the Republic of Venice to renounce the Dalmatian towns in 1358 (
Treaty of Zadar). About 1360, the
Balšić family of
Zeta gained control of Bar as the Serbian Empire
crumbled. Venice took Bar from the Bašićs in 1405, but lost it back to the Bašićs in 1412 as they had received aid from
Mehmed I. However in 1421 the Venetians took advantage of
Balša III's death to reclaim Bar, however, the
Serbian Despotate ended up in control of Bar from 1421 to 1441. In 1441 and again in 1442 to 1443, Bar was in the hands of the Grand Duke of Bosnia,
Stefan Vukčić Kosača. In 1443, it was again annexed by Venice who held it until it was taken by the
Ottoman Empire in 1571 as part of the
Ottoman expansion into Europe. On 13 November 1877, during the
Montenegrin–Ottoman War (1876–78), the town was besieged by forces under the command of
Mašo Vrbica. The defenses of the town were in the hands of Ibrahim Bey, who refused to surrender the town despite the Montenegrin heavy artillery bombardment, consisting of four Russian guns, and six Ottoman guns that had been seized at the
Battle of Nikšić. The bombardment lasted over seven weeks and much of the town was destroyed. On 5 January 1878, the Montenegrins detonated a 225 kg explosive inside the
Bar Aqueduct which cut off the town's water supply. Ibrahim Bey surrendered the town on 9 January. The Bar peninsula and the town were awarded to the newly recognized
Principality of Montenegro at the
Congress of Berlin (1878). After the
1979 Montenegro earthquake destroyed the
aqueduct that supplied water to the town, the location was abandoned, and the new town of
Bar constructed on the coast at the old port facilities. After the aqueduct was restored some years later, people began to return. ==Demographics==