Origins
The city was established in the 7th century (circa 614) after Avar and Slavic raiders destroyed the Roman city of Epidaurum, today's Cavtat. Some of the survivors moved 25 kilometers north to a small island near the coast where they founded a new settlement, Lausa. It has been claimed that a second raid by Croats in 656 resulted in the total destruction of Epidaurum.
Epidaurum had earlier been destroyed in AD 265 by the Goths and, according to English writer John Gardner Wilkinson, "Rausium (Ragusa) probably was founded long before Epidaurus was finally destroyed, and that the various eruptions of barbarians, in the third and succeeding centuries, had led to the original establishment of this place of refuge".
The refugees from Roman Epidaurum built their new settlement on the small island (some sources say peninsula) of Lausa off the shore while other populations (primarily Croats) settled along the coast in the following centuries, directly across the narrow channel, and named their settlement Dubrovnik. Initially the populations were skeptical of each other. Over time they grew closer and finally in the 12th century the two settlements 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.
Recently another theory appeared, based on new archaeological excavations. New findings, including a chapel and part of the city walls, were dated to the 5th century, clashing with earlier theories. The size of the old chapel indicates that there was quite a large settlement at that time. A new theory appeared dating construction of Dubrovnik back to Greek times. The Greek theory was boosted with recent findings of numerous Greek artifacts during excavations in the Port of Dubrovnik.
Antun Ničetić, in his book Povijest dubrovačke luke ("History of the Port of Dubrovnik") explains his theory that Dubrovnik was established by Greek sailors. The key element in this theory is the fact that ships in ancient time traveled about 45 to 50 nautical miles per day, and 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 half way between the Greek settlements of Budva and Korčula, which are 95 nautical miles (176 km; 109 mi) apart.
Early centuries
The Saracens laid siege to Dubrovnik in 866 and 867; the siege lasted for fifteen months and was raised due to the intervention of the Byzantine Emperor, Basil the Macedonian, who sent a fleet under Niketas Oryphas in relief. With the weakening of Byzantium, Venice began to see Ragusa as a rival that needed to be brought under her control, but the attempt to conquer the city in 948 failed. The citizens of the city attributed this to Saint Blaise (Croatian: Sveti Vlaho), whom they adopted as the patron saint.
Ragusa in those early medieval centuries was an island, and had a population of Latinized Illyrians, who spoke their own Romance Dalmatian language
In 1050, Croatian king Stjepan I, ruler of Bosnia and Dalmatia, made a grant of land along the coast that extended the boundaries of Ragusa to Zaton, 16 km north of the original city, giving the republic control of the abundant supply of fresh water that emerges from a source vauclusienne at the head of the Ombla inlet. Stephen's grant also included the harbour of Gruž, which is now the commercial port for Dubrovnik.
In the 11th century, Dubrovnik and the surrounding area were described in the work of the famous Arab geographer Muhammad al-Idrisi. In his work, he mentioned Dubrovnik as the southernmost city of "the country of Croatia and Dalmatia".
In 1191, the city's merchants were granted the right to trade freely in Byzantium by Emperor Isaac II Angelos. Similar privileges were obtained several years earlier from Serbia (1186) and from Bosnia (1189). The treaty with Bosnian Ban Kulin is also the first official document where the city is referred to as Dubrovnik.
Venetian suzerainty (1205–1358)
When, in 1205, the Republic of Venice invaded Dalmatia with the forces of the Fourth Crusade, Ragusa was forced to pay a tribute and became a source of supplies for Venice (hides, wax, silver and other metals). Venice used the city as its naval base in the southern Adriatic Sea. Unlike with Zadar, there was not much friction between Ragusa and Venice as the city had not yet begun to compete as an alternate carrier in the trade between East and West; in addition, the city retained most of its independence. The people, however, resented the ever growing tribute and an almost epic hatred between Ragusa and Venice began to grow.
In the middle of the thirteenth century the island of Lastovo was added to the original territory. Then in 1333, the Pelješac Peninsula and Dubrovačko primorje were purchased from Serbia with the blessing of Bosnia; the island of Mljet was acquired in 1345. In January 1348, the Black Death visited the city.
Independence from Venice and establishment of the Republic (1358)
After Venice was forced in 1358, by the Treaty of Zadar, to yield all claims to Dalmatia, the city accepted the mild hegemony of King Louis I of Hungary. On 27 June 1358, the final agreement was reached at Visegrád between Louis and the Archbishop Ivan Saraka. The city recognized Hungarian sovereignty, but the local nobility continued to rule with little interference from Buda. The Republic profited from the suzerainty of Louis of Hungary, whose kingdom was not a naval power, and with whom they would have little conflict of interest.The last Venetian rector left, apparently in a hurry.
In 1399, the city acquired the area between Ragusa and Pelješac, called the Primorje. Moreover, between 1419 and 1426, the Konavle region south of Astarea, including the city of Cavtat, was added to the republic's possessions. In the first half of the 15th century Cardinal Ivan Stojković (Johannes de Carvatia) was active in Dubrovnik as a Church reformer and writer.
(source:wikipedia)