1277 papal election
The 1277 papal election, convened in Viterbo after the death of Pope John XXI, was the smallest papal election since the expansion of suffrage to cardinal-priests and cardinal-deacons, with only seven cardinal electors. Because John XXI had revoked Ubi periculum, the papal bull of Pope Gregory X establishing the papal conclave, with his own bull Licet felicis recordationis, the cardinal electors were able to take their time. After six months of deliberation, the cardinals eventually elected their most senior member Giovanni Orsini as Pope Nicholas III. From the end of the election until Nicholas III's first consistory on 12 March 1278, the number of living cardinals—seven—was the lowest in the history of the Roman Catholic Church.
Cardinal electors
The seven cardinal electors were evenly divided between three supporters of Charles of Anjou and three cardinals from prominent Roman families, who opposed the interests of Charles in Italy, and there was one uncommitted cardinal.| Elector | Nationality | Faction | Order and Title | Elevated | Elevator | Notes |
| Bertrand de Saint-Martin | French | neutral | Cardinal-bishop of Sabina | 1273, June 3 | Gregory X | Dean of the College of Cardinals |
| Anchero Pantaleone | French | Angevin | Cardinal-priest of S. Prassede | 1262, May 22 | Urban IV | Protopriest; Cardinal-nephew |
| Guillaume de Bray | French | Angevin | Cardinal-priest of S. Marco | 1262, May 22 | Urban IV | Camerlengo of the Sacred College of Cardinals |
| Giovanni Orsini | Roman | Roman | Cardinal-deacon of S. Nicola in Carcere Tulliano | 1244, May 28 | Innocent IV | Protodeacon, archpriest of the patriarchal Vatican Basilica, Inquisitor General, and Protector of the Order of Franciscans; Elected Pope Nicholas III |
| Giacomo Savelli | Roman | Roman | Cardinal-deacon of S. Maria in Cosmedin | 1261, December 17 | Urban IV | Future Pope Honorius IV |
| Goffredo da Alatri | Italian | Angevin | Cardinal-deacon of S. Giorgio in Velabro | 1261, December 17 | Urban IV | |
| Matteo Rosso Orsini | Roman | Roman | Cardinal-deacon of S. Maria in Portico | 1262, May 22 | Urban IV | Nephew of Giovanni Orsini |
Procedure
Initially, the cardinals met only once a day for balloting and returned to their respective habitations after the scrutinies. For two months, voting proceeded uneventfully along national lines with the French and Roman cardinals evenly divided.After six months the impatient magistrates of Viterbo locked the cardinals in the town hall.