of the Republic were: the City of Ragusa (Dubrovnik), counties (Konavle, Župa dubrovačka – Breno, Slano – Ragusan Littoral, Ston, Island of Lastovo, Island of Mljet, Islands of Šipan, Lopud and Koločep) and captaincies (Cavtat, Orebić, Janjina) with local magistrates appointed by the Major Council. Lastovo and Mljet were semi-autonomous communities each having its own Statute. Historical background Origin of the city According to the De Administrando Imperio of the Byzantine emperor Constantine VII Porphyrogennetos, the city was founded, probably in the 7th century, by the inhabitants of the Roman city of Epidaurum (modern Cavtat) after its destruction by the Avars and Slavs c. 615. Some of the survivors moved north to a small island near the coast where they founded a new settlement, Lausa. It has been claimed that a second raid by the Slavs in 656 resulted in the total destruction of Epidaurum. Slavs settled along the coast in the 7th century. The Slavs named their settlement Dubrovnik. The Romans ("Latin") and Slavs had an antagonistic relationship, though by the 12th century the two settlements had merged. The channel that divided the city was filled, creating the present-day main street (the Stradun) which became the city centre. Thus, Dubrovnik became the Slavic name for the united town. There are recent theories based on excavations that the city was established much earlier, at least in the 5th century and possibly during the Ancient Greek period (as per Antun Ničetić, in his book Povijest dubrovačke luke). The key element in this theory is the fact that ships in ancient time traveled about 45 to 50 nautical miles per day, and mariners required a sandy shore to pull their ships out of the water for the rest period during the night. An ideal combination would have a fresh water source in the vicinity. Dubrovnik had both, being halfway between the Greek settlements of Budva and Korčula, which are apart. Early centuries During its first centuries the city was under the rule of the Byzantine Empire. The Saracens laid siege to the city in 866–867; it lasted for fifteen months and was raised due to the intervention of Byzantine Emperor who sent a fleet under Niketas Ooryphas in relief. Ooryphas' "showing of the flag" had swift results, as the Slavic tribes sent envoys to the Emperor, once more acknowledging his suzerainty. Basil dispatched officials, agents and missionaries to the region, restoring Byzantine