The first stirrings of revival from anarchy in Western Europe took place in Italy. There were three reasons for this. First of all, the Roman cities were older and more deeply rooted than cities in Northern Europe. Second, their position in the middle of the Mediterranean attracted trade from the richer Byzantine and Muslim civilizations in the East. Finally, the Byzantine Empire, which ruled parts of Italy, protected its towns there from at least some of the chaos of the times. Italian towns were much reduced in size from the days of the Roman Empire, but they still functioned as religious centers ruled by bishops as well as centers of defense.
In the eighth century, the popes had summoned the Frankish rulers, Pepin the Short and Charlemagne to Italy to defend them against the Lombards. Especially as a result of Charlemagne's campaigns, the northern half of Italy came under Frankish rule. After Charlemagne's death in 814, law and order collapsed with the central government, but the Frankish nobles left behind by Charlemagne remained as the power in the countryside while the bishops ruled the cities.
The turmoil following Charlemagne's death attracted waves of Muslim raids These raids reached their peak in the ninth and tenth centuries, and, at one point, the Muslims even controlled part of Rome. Eventually, they were driven out, leaving the Frankish nobles in the countryside to fight one another for control of Northern Italy. Holding the balance of power in these struggles were the bishops in the towns. In order to enlist the bishops' aid the Frankish nobles promised various rights to them. Typically, the first of these rights was to build their own fortifications. Since such projects were expensive, the Franks gave the bishops the right to collect taxes. And along with that would come certain judicial rights that also brought in court fees. Over time, the bishops' power and their desire to break free from the nobles steadily grew.
Luckily for the bishops, a strong German state with interests in Italy was emerging under Otto I. At the pope's request, Otto came down and crushed the power of the nobles and left the bishops in the cities as his agents of control in Northern Italy. This resulted in two things. For one thing, the pope rewarded Otto in 961 with the Roman imperial title that Charlemagne had been given 160 years before. For the next 850 years, the aura of the imperial title would influence German rulers' policy and be the cause of ruin for Germany. However, at this time, a strong Germany, or Holy Roman Empire as it came to be called, was useful for protecting the peace in Italy. Second, the Italian cities, now freed from the nobles, started to take the offensive against the Muslim raiders. By 1200, Italian navies and merchants would be powerful enough to dominate the Mediterranean, help the Crusaders conquer and maintain their states in Syria and Palestine, and even conquer Constantinople in 1204.
Together, these factors brought peace and security from the Muslims and Frankish nobles, which led to the revival of towns and trade. At first, this benefited the bishops ruling the cities, since it brought in more taxes from trade. But it also meant the rise of a middle class of artisans and merchants in each city who were increasingly dissatisfied with living under the rule of the bishops. Eventually, they rose up against the bishops and overthrew them, establishing independent town governments known as communes. As nobles moved into the towns where many of them took up trade and merchants seized more and more political power, the distinction between nobles and middle class became somewhat blurred. What emerged in Italy was a new nobility known as magnates (literally "great ones") that was a fusion of these two groups.
It is important to note that while we talk about Italy as a country, it still existed as a patchwork of different and competing states. Northern Italy, in particular, was made up of a large number of independent city-states, the most important being Venice (a former Byzantine city), Genoa, Pisa, and, later on, Milan and Florence. It was these cities that led the way for Western Europe to emerge from the Early Middle Ages. Their example and wealth would help spark a similar revival of towns north of the Alps. However, as we shall see, the political development of Northern Europe would be quite different from that of Italy, giving rise to the emergence of what would be our modern nation states.