The Republic of Venice is one of the most successful thalassocracies (i.e. maritime empire) in World history. It started from humble beginnings when populations on the Adriatic coast of the Northern Italian peninsula established their dwellings on the islands of a lagoon to repel the invaders that were common in the early medieval period. As its status as a port grew, it established formal independence in the early 9th Century when the Byzantine and Holy Roman Emperors agreed not to claim it as their own. Venice went on to control a significant part of the Italian mainland (Terraferma) as well as numerous colonies throughout the Mediterranean basin and as far as the Black Sea. The control of trading routes ensured its wealth for Centuries, but the emergence of modern empires proved fatal to the Republic: it fell under Austrian rule in the late 18th Century, and was finally reunited with Italy in 1866.