The medieval centuries represent a problematic chapter in the history of Rome. The city suffered due to conflicts between popes and emperors, were unprotected and exposed to attacks and looting by the Saracens (846) and Normans (1084) and overcome by the anarchy caused by the struggle for power between aristocratic families and the Pope.
Unlike cities of northern Italy, such as Florence, Milan, Venice, Pisa and Genoa, Rome was located far away from the great commercial and maritime streets and therefore wasn't able to profit from general economic progress.
In the 12th Century the citizens led by Arnaldo of Brescia, rebelled against the temporal power of the pope and established a republican democratic government (1143-1144) that was however short lived like the one founded two centuries later by Cola of Rienzo. In 1300 the declaration of the first ‘Anno Santo' gave the city a brief period of relative tranquillity, but soon after the aristocratic families get the upper hand in their struggle to obtain control in papal matters.
The situation was made worse by a conflict with France that would have grave consequences. Under Bonifacio VIII (1294-1303) the struggle by the pope for supremacy reached a peak. Clemente V (1305-1314) is the first French pope elected backed by the king of France, who forces the transfer of the papal seat in 1309 to Avignone where it would remain for 70 years.
During this period Rome passed it's worst period known as the Babylonian captivity of the Popes as it was known, because it was harder than the imprisonment of the Jews in Babylon. Things didn't really change even with the return to Rome of Gregorio XI (1370-1378), because until 1417 the Christian population was divided.
At the same time there were more popes claiming papal rights. At the end the council of Costanza (1414-1418) put an end to this split electing in 1417 Martino V from the Colonna family. This pope (1417-1431) revived Rome from the ashes and forecast the humanism and renaissance eras.
The appearance of the city at that time reflected a state of continual struggles and conflicts, fortified houses, towers of noble families . And yet during these disastrous centuries there continued to be carried out important works of art, such as the mosaics of Cosmati and the paintings of Giotto or the enigmatic Pietro Cavallini. Only the exile of the pope to Avignone during the XIV century put an end to such artistic activity. The number of inhabitants drastically decreased, whilst churches, palaces, streets and squares emptied.