The ancient capital that became the city of the popes: fought over in the Gothic War, the scene of Charlemagne's coronation in 800, contested by emperors, nobles and a commune, and half-abandoned during the papacy's Avignon century.
Rome entered the Middle Ages as a city too large for its people. The capital that had held perhaps a million inhabitants under the emperors shrank, after the wars of the sixth century, to a few tens of thousands living in the bend of the Tiber, among ruins whose walls still enclosed fields and vineyards. What kept it from becoming a provincial town was the papacy: the bishops of Rome, heirs by tradition of Saint Peter, made the city the centre of Latin Christendom.
Medieval Rome was therefore two cities at once: a sacred city of pilgrimage to the tombs of the apostles Peter and Paul, and a violent political town where popes, Roman noble families, the commune and the German emperors fought for control. Its landmarks record both: St Peter's and the Lateran, the Aurelian Walls and the Leonine Wall, and the mausoleum of Hadrian turned into the papal fortress of the Castel Sant'Angelo.
The deposition of the last western emperor in 476 changed little on the ground. Odoacer and then the Ostrogothic king Theodoric ruled Italy from Ravenna, kept the Senate and repaired the city's walls and aqueducts. Rome's catastrophe came with Justinian's reconquest. In the Gothic War Belisarius took the city in 536 and held it through a year-long Ostrogothic siege in 537–538, but Rome changed hands repeatedly until 552, and the cut aqueducts and the flight of the senatorial class left it a shadow of itself.
For two centuries afterwards Rome was a Byzantine duchy on the edge of Lombard Italy, and its bishops became its effective rulers. Gregory the Great, pope from 590 to 604, fed the city from the papal estates, bargained with the Lombards and sent the mission that began the conversion of the English. The popes' turn from Constantinople to the Franks began when the Lombards threatened the city and Pope Stephen II crossed the Alps in 754 to seek the protection of Pepin the Short.
The alliance produced the defining ceremony of the medieval West. On Christmas Day 800, in St Peter's, the pope crowned Charlemagne emperor of the Romans, a year after Roman enemies had attacked that same pope in the street and the Frankish king had restored him. The coronation made Rome the place where western emperors had to be made, and for six centuries German kings crossed the Alps to receive the crown there, often by force.
The Carolingian popes rebuilt the city's churches and defences. After Arab raiders sailed up the Tiber in 846 and plundered St Peter's, which lay outside the ancient walls, the Vatican was enclosed by the Leonine Wall, completed in 852. In the tenth century power passed to Roman aristocrats, Theophylact, his daughter Marozia and her son Alberic, who ruled Rome as prince of the Romans from 932 to 954, until the German king Otto the Great was crowned emperor in 962 and began imposing popes of his own choosing.
The reform papacy of the eleventh century made Rome the seat of a church that claimed authority over kings, and the city paid for it. In 1084, at the height of the struggle between Pope Gregory VII and the emperor he had excommunicated, the Norman duke Robert Guiscard came to rescue the besieged pope and sacked Rome so savagely that Gregory had to leave with his rescuers; he died in exile at Salerno the next year.
In 1143 the citizens rose, revived the Senate on the Capitol and set up a commune that claimed to govern the city without the pope. The preacher Arnold of Brescia gave it a programme of apostolic poverty until Frederick Barbarossa had him executed in 1155 as part of the price of his own coronation. Rome's great families, the Orsini, Colonna, Savelli and Frangipani, fortified ancient monuments as towers and fought one another from them, and popes often governed from Viterbo, Orvieto or Anagni rather than from the city.
Innocent III, pope from 1198 to 1216, came nearest to mastering both city and Church: he brought the Senate under papal control, and in 1215 he held the Fourth Lateran Council in the Lateran basilica. Boniface VIII proclaimed the first Jubilee in 1300, and the crowds were so great that Dante, in the Inferno, compared the lines of the damned to the pilgrims kept to either side of the bridge to St Peter's.
Three years after the Jubilee, Boniface was seized at Anagni by agents of Philip IV of France, and from 1309 the popes lived at Avignon. Without its court Rome's economy collapsed and its population fell to perhaps twenty or thirty thousand. In 1347 the notary Cola di Rienzo seized the Capitol and proclaimed himself tribune, promising to restore the ancient republic; he was driven out, returned as a papal agent in 1354, and was killed by a Roman crowd within months.
Gregory XI brought the papacy back in 1377, but his death the next year produced the Great Western Schism, with rival popes in Rome and Avignon. Only after the Council of Constance elected Martin V, a Colonna, did a single pope enter Rome in 1420, and he and his successors began rebuilding the ruined city. The Renaissance papacy that followed turned medieval Rome into the city of the new St Peter's, begun in 1506.
The inhabited city contracted into the Campus Martius and the bend of the Tiber opposite the Vatican, while the hills inside the Aurelian Walls went back to vineyards, pasture and monasteries. Two poles organised it: the Lateran in the south-east, cathedral and palace of the popes as bishops of Rome, and across the river St Peter's, with its borgo of pilgrim hostels, joined by processional routes through the ruins.
Ancient buildings survived because they were reused. The Pantheon became the church of Santa Maria ad Martyres in 609, Hadrian's mausoleum became the Castel Sant'Angelo, and the Colosseum and the Theatre of Marcellus were turned into noble strongholds. The rest was quarried: lime kilns burned ancient marble for mortar, and Charlemagne carried columns from Rome and Ravenna to his chapel at Aachen. Pilgrims found their way with the Mirabilia Urbis Romae, a twelfth-century guide that mixed real monuments with legends about them.