The origins of Venice are not directly dealt with in historical records, but the available evidence has led several historians to agree that the original population of Venice comprised refugees from Roman cities such as Padua, Aquileia, Altino and Concordia (modern Portogruaro) who were fleeing successive waves of barbarian invasions.
The first was in 166-168, when the Quadi and Marcomanni destroyed the main center in the area, the current Oderzo.
The Roman defenses were again overthrown in the early fifth century by the Visigoths and, some fifty years later, by the Huns under Attila.
The last and most enduring was that of the Lombards in 568.
This left Constantinople a small strip of coast in current Veneto, and the main administrative and religious entities, were therefore transferred to this remaining dominion.
New ports were built, including those at Malamocco and Torcello in the Venetian lagoon.
Imperial domination of central and northern Italy had been largely eliminated by the conquest of the Exarchate of Ravenna in 751 by Aistulf.
During this period, the seat of the local imperial governor (the "duke", or “dux”, later "doge") had been situated in Malamocco.
Settlement across the islands in the lagoon had probably increased in correspondence with the Lombard conquest of the imperial territories.
The bishopric seat of Olivolo (Helipolis) had been created In 775-776.
The ducal seat had been moved under Agnello Particiaco, doge from 811, from Malamocco to the highly protected Rialto (Rivoalto, "High Shore") island, the current location of Venice.
The monastery of St. Zachary and the first ducal palace and basilica of St. Mark, as well as a walled defense (civitatis murus) between Olivolo and Rialto will subsequently be built here.
Agnello had undertaken the building of many bridges connecting the islands.
A merchant as well as a statesman, he had obtained important commercial privileges from the emperors Leo V the Armenian and Michael II.
Agnello’s son Giustiniano had been away in Constantinople when his father, the then-reigning Doge Agnello, had appointed his younger brother Giovanni as co-doge.
When Giustiniano returned, he had flown into a fury.
Agnello appointed his third son, also Agnello, co-doge and began to oppose Giustiniano, even besieging him in the church of San Severo.
Giustiniano gained the upper hand, however, and exiled his younger brother and succeeded his father as doge in 827.
The emperor Michael II offered military support to Venice in return for a contingent of Venetians in his expedition to Aghlabid Sicily.
The success of the expedition increases the prestige of the city.