The 1277 papal election (May 30 – November 25), 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 (following the deaths of three popes who had not created cardinals).
After six months of deliberation, the cardinals eventually elected their most senior member Giovanni Gaetano Orsini as Pope Nicholas III.
From the end of the election until Nicholas III's first consistory on March 12, 1278, the number of living cardinals—seven—was the lowest in the history of the Roman Catholic Church.
[4] For two months, voting proceeded uneventfully along national lines with the French[5] and Roman cardinals evenly divided.
[4] After six months the impatient magistrates of Viterbo locked the cardinals in the town hall (once elected, Nicholas III moved the papacy back to Rome).