Guelphs and Ghibellines.
In 1204 the streets of Rome were again in flames when the struggle between Pope Innocent III's family and its rivals, the powerful Orsini family, led to riots in the city. Many ancient buildings were then destroyed by machines used by the rival bands to besiege their enemies in the innumerable towers and strongholds which were a hallmark of the Middle Age Italian towns.
The struggle between the Popes and the emperor Frederick II, also king of Naples and Sicily, saw Rome support the Ghibellines. To repay his loyalty, Frederick sent to the commune the Carroccio he had won from the Lombards at the battle of Cortenuova in 1234, and which was exposed in the Campidoglio.
In that year, during another revolt against the Pope, the Romans headed by senator Luca Savelli sacked the Lateran. Savelli was the father of Honorius IV, but in that age family ties often did not determine one's allegiance.
Rome was never to evolve into an autonomous, stable reign, as happened to other communes like Florence, Siena or Milan. The endless struggles between noble families (Savelli, Orsini, Colonna, Annibaldi), the ambiguous position of the Popes, the haughtiness of a population which never abandoned the dreams of their splendid past but, at the same time, thought only of immediate advantage, and the weakness of the republican institutions always deprived the city of this possibility.
In an attempt to imitate more successful communes, in 1252 the people elected a foreign Senator, the Bolognese Brancaleone degli Andalò. In order to bring peace in the city he suppressed the most powerful nobles (destroying some 140 towers), reorganised the working classes and issued a code of laws inspired by those of northern Italy. Brancaleone was a tough figure, but died in 1258 with almost nothing of his reforms turned into reality. Five years later Charles I of Anjou, then king of Naples, was elected Senator. He entered the city only in 1265, but soon his presence was needed to face Conradin, the Hohenstaufen's heir who was coming to claim his family's rights over southern Italy, and left the city. After June 1265 Rome was again a democratic republic, electing Henry of Castile as senator. But Conradin and the Ghibelline party were crushed in the Battle of Tagliacozzo (1268), and therefore Rome fell again in the hands of Charles.
Nicholas III, a member of Orsini family, was elected in 1277 and moved the seat of the Popes from the Lateran to the more defensible Vatican. He also ordered that no foreigner could become senator of Rome. Being a Roman himself, he had himself elected senator by the people. With this move, the city began again to side for the papal party. In 1285 Charles was again Senator, but the Sicilian Vespers reduced his charisma, and the city was thenceforth free from his authority. The next senator was again a Roman, and again a pope, Honorius IV of the Savelli.
Boniface VIII and the Avignon captivity.
The successor to Celestine V was a Roman of the Caetani family, Boniface VIII. Entangled in a local feud against the traditional rivals of his family, the Colonna, at the same time he struggled to assure the universal supremacy of the Holy See. In 1300 he launched the first Jubilee and in 1303 founded the first University of Rome. The Jubilee was an important move for Rome, as it further increased its international prestige and, most of all, the city's economy was boosted by the flow of pilgrims. Boniface died in 1303 after the humiliation of the Schiaffo di Anagni ("Slap of Anagni"), which signalled instead the rule of the King of France over the Papacy and marked another period of decline for Rome.
Boniface's successor, Clement V, never entered the city, starting the so-called "Avignon captivity", the absence of the Popes from their Roman seat in favour of Avignon, which would last for more than 70 years. This situation brought the independence of the local powers, but these were revealed to be largely unstable; and the lack of the holy revenues caused a deep decay of Rome.[79][80] For more than a century Rome had no new major buildings. Furthermore, many of the monuments of the city, including the main churches, began to fall into ruin.
Wikipedia: Text is available under the Creative Commons Attribution-ShareAlike 4.0 License.