From the Middle Ages until the end of the nineteenth century, Italy was divided into many small duchies and city-states, some of which were autonomous and some of which were controlled by Austria, France, Spain, or the Papacy. These multifarious governments and the diversity of Italian dialects spoken on the peninsula caused residents to identify as "Romans" or "Venetians", for example, rather than as "Italians". When Napoleon conquered parts of Italy during the French Revolutionary Wars (1792–1802) and the Napoleonic Wars (1803–15), he unified many of the smaller principalities; he centralised the governments and built roads and communication networks that helped to break down the barriers between and among Italians.