The city was founded by people from the greater Veneto region as a refuge from the Barbarian invasions, when the Western Roman Empire fell. During the Middle Ages, Venice slowly grew to become an important commercial city. Around the year 1000 AD the Republic of Venice started to create an empire in the eastern Mediterranean Sea. It lasted until 1797, when it was annexed by Napoleon's France. It then changed hands a few times, becoming a part of Austria two times, before becoming part of Italy during the Italian unification. Venice deeply influenced the Venetian, Istrian and Dalmatian coasts for one thousand years.