Question: Guelphs and Ghibellines supported the Pope during which time frame?
Context: The Italian city-states were a political phenomenon of small independent states mostly in the central and northern Italian peninsula between the 9th and 15th centuries. The Battle of Campaldino was a battle between the Guelphs and Ghibellines on 11 June 1289.  Mixed bands of pro-papal Guelf forces of Florence and allies, Pistoia, Lucca, Siena and Prato, all loosely commanded by the paid "condottiero" Amerigo di Narbona with his own professional following, met a Ghibelline force from Arezzo including the perhaps reluctant bishop, Guglielmino degli Ubertini, in the plain of Campaldino, which leads from Pratovecchio to Poppi, part of the Tuscan countryside along the upper Arno called the Casentino.  One of the combatants on the Guelph side was Dante Alighieri, twenty-four years old at the time. The papal election, following the death of Pope Gregory IX, from September 21 to October 25, 1241 elected Cardinal Goffredo da Castiglione as Pope Celestine IV.  The election took place during the first of many protracted "sede vacantes" of the Middle Ages, and like many of them was characterized by disputes between popes and the Holy Roman Emperor.  Specifically, the election took place during the war between Frederick II, Holy Roman Emperor against the Lombard League and the deceased pontiff, Pope Gregory IX, with Italy divided between pro-Papal and pro-Imperial factions known as the Guelphs and Ghibellines. The Battle of Zappolino (also known as the War of the Oaken Bucket) was fought in November 1325 between forces representing the Italian towns of Bologna and Modena, an incident in the series of raids and reprisals between the two cities that were part of the larger conflicts of Guelphs and Ghibellines.  The Modenese were victorious.  Though many clashes between Guelphs and Ghibellines loomed larger to contemporaries than to historians, in this unusually large encounter between 4000 estimated cavalry and some 35,000 foot soldiers, 2000 men lost their lives.  The location of the battle, at the foot of a hill just outside the castle walls, is today a "frazione" of the municipality of Castello di Serravalle, Emilia-Romagna. The Battle of Gamenario, fought on 22 April 1345, was a decisive battle of the wars between the Guelphs (represented by the Angevins) and Ghibellines (Lombard communes).  It took place in north-west Italy in what is now part of the commune of Santena about 15 km southeast of Turin. The Bevilacqua dynasty governed parts of northern Italy between the 10th and 12th centuries.  Their rise to prominence began in 962 when Otto I the Great, the first Holy Roman Emperor, appointed Antonio Bevilacqua as Governor of Lazise.  The family remained loyal to the Emperors until they later allied themselves with Matilda of Tuscany; they were granted a Principality at Bevilacqua in 1059, and acquired other territories in the areas of Verona and Ferrara.  During the 12th-century conflicts between the Guelphs and Ghibellines, the Bevilacqua led the victorious Ghibellines of Verona.  They later supported the Canossa family of the Lombard League against Frederick Barbarossa, and in recognition received the church of San Salvaro in Verona. The election which took place around the death of Pope Gregory IX on August 22, 1241, was a particularly stressful one.  There were military operations, both inside and outside the City of Rome, towns and properties were destroyed, Guelphs and Ghibellines warred against each other, and two of the cardinals were captured in battle and were held prisoner by the Emperor Frederick II.  When the electoral meeting began, only ten of the twelve cardinals participated.  The cardinals were tightly confined, on orders of the Senator of Rome, Matteo Rosso Orsini, and during that conclave one cardinal died.  After seven weeks of deadlocked negotiations in the summer heat of Rome, the cardinals finally managed to produce the required two-thirds majority on October 25 for Cardinal Goffredo Castiglione, who chose the name Celestine IV.  Pope Celestine was never crowned.  It is also said that he was never consecrated, which is pointless, since he was already a bishop, and that he never issued a bull, which is contested.  He died, old and ill, only seventeen days after his election, on November 10, 1241. The Guelphs and Ghibellines ( ; , also , ; Italian: "guelfi e ghibellini" ] ) were factions supporting the Pope and the Holy Roman Emperor, respectively, in the Italian city-states of central and northern Italy.  During the 12th and 13th centuries, rivalry between these two parties formed a particularly important aspect of the internal politics of medieval Italy.  The struggle for power between the Papacy and the Holy Roman Empire had arisen with the Investiture Controversy, which began in 1075 and ended with the Concordat of Worms in 1122.  The division between the Guelphs and Ghibellines in Italy, however, persisted until the 15th century. The Siege of Crema was a siege of the town of Crema, Lombardy by the Holy Roman Empire in 1159.  The Cremaschi tried to defend their city from the German invaders, but they were eventually defeated by Frederick's men.  Frederick seized Milan in 1162 shortly after he took Crema.  These events started the wars of Guelphs and Ghibellines, leading to the formation of the Lombard League, a league of northern Italian communes allied against the emperor, supported by the Pope. Guido da Landriano (before 1159 — after 1190) was an Italian condottiero and politician of the Landriani family.  He was the leader of the Lombard League army in the war of the Guelphs and Ghibellines against the Holy Roman Empire.
Answer: 9th and 15th centuries