In the Roman times the term Venice stood for the North-Eastern region of Italy, but following the collapse of the Roman Empire and particularly the arrival of the Longobards (568), it started to indicate a part of the small settlements that were created on the islands of the lagoon between the Adige and the Piave rivers. Their economy was based on the trade activities between the Near-East countries and Northern Europe (Germany and Flanders).
They established a federation legally dependent on Byzantium but their relations became increasingly looser as the latter's decay proceeded, and they acquired complete independence towards the end of the 9th century. Hence, ever since the beginning of the
9th century, the domination of Eraclea and Malamocco were followed by that of Rivo alto (Rialto, today's Venice). This event coincided with the failure of the Franks' attempt to conquer the islands. After driving back the Arab invasions and eliminating in the year 1000 the Croat piracy in the Adriatic sea, the political expansion to Istria and Dalmatia started, under the leadership of a class of shipowners and merchants who had managed to prevent some of the major families (Partecipazio, Candiano, Orseolo) from introducing the hereditary power system.
In order to prevent the closure of the Otranto canal (the gateway to the East) and of the passes on theAlps that were so vital to trade with northern countries, Venice had to fight the Normans, Suevians and Angevins who were trying to settle along the Albanian and Epirot coasts, and at the same time it joined the Lombard League to prevent the Emperor from acquiring an excessive power.