(25 Nov. 1277–22 Aug. 1280)
After John XXI's unexpected death the seven cardinals took six months to choose a successor. The most obvious candidate was Giovanni Gaetano, born in Rome 1210/20 as son of Matteo Rossi and Perna Gaetani, of the noble Orsini family. He was for more than 30 years a member of the sacred college and as such a force in papal elections, able, statesmanlike, and widely experienced, the power behind John XXI's moves to curb the Angevin king Charles of Sicily's (1266–85) predominance in Italy. For this reason, while three cardinals backed him, he was fiercely opposed by three partisans of Charles. When the deadlock was at last broken and Orsini elected, he adopted the name Nicholas because from 28 May 1244 he had been cardinal deacon of S. Niccolò in Carcere. From 1262 he headed the Inquisition, and the following year was appointed as protector of the Franciscans, an order with which his family was closely associated. In 1276 he became archpriest of St Peter's.
As pope he made it his objective, like Gregory X but in reaction to Innocent V, to restore the political independence of the holy see in Italy vis-à-vis the house of Anjou. In Rome he persuaded Charles of Sicily, when his office as senator expired in Sept. 1278, not to seek reappointment, decreed (11 July) that no outside prince should henceforth hold it without special leave, and then had himself elected to it for life, thereby creating the papal signoria over Rome. He also sought to limit Charles's influence in central Italy, getting him to resign as imperial vicar in Tuscany and pacifying, with mixed success, the warring city factions which gave him an excuse to interfere. Meanwhile he was negotiating with King Rudolf I of Habsburg (1273–91), Gregory X's emperor-designate, who not only confirmed the privileges and donations granted by previous emperors, but formally renounced (14 Feb. 1279) all imperial claims to Romagna. As the territory had been disputed for generations, Nicholas thus effectively enlarged the papal state and rounded off its frontiers as they were to remain until 1860. Finally, aiming at a long-term understanding between the houses of Anjou and Habsburg which would ensure papal supremacy in Italy, he deployed all his diplomatic skill in arranging an alliance between them, to be sealed by the marriage of Rudolf's daughter Clementia and Charles's grandson Charles Martell (1271–95), under which each swore to respect and defend the other's realms unless either attacked the church. The complex project, which included Clementia's receiving Burgundy as her dowry, seems also (the evidence is somewhat and dubious and late) to have envisaged the eventual partition of the empire into the four kingdoms of Germany, Burgundy, Lombardy, and Tuscany, with Germany as a hereditary, no longer an elective, monarchy, and the emperor overlord of all four.
In the interests of the crusade agreed at the second council of Lyons (1274) Nicholas continued John XXI's efforts, but without result, to arbitrate between Alfonso X of Castile (1252–84) and Philip III of France (1270–85), each claiming the kingdom of Navarre, and pressed on with the collection of the subsidy voted by the council. He disappointed the Byzantine emperor Michael VIII Palaeologus (1259–82) by refusing to excommunicate Charles's Latin allies in Epirus and Thessaly, but effectively blocked the king's plans for launching an attack on Constantinople by inviting Byzantine envoys to discuss peace terms and getting Charles, in spite of unconcealed reluctance, to grant them a safe-conduct. The terms he sent Michael for the implementation of the union of the churches were even stiffer than those of Innocent V and included the acceptance of a permanent papal legate at Constantinople. He had no wish, however, to imperil the fragile union, and empowered his envoys to be accommodating where they deemed it desirable. Nearer home he reformed procedure in the papal chancery and improved the quality of the sacred college by several distinguished appointments. A friend of the Franciscans, whose protector he had been as cardinal, and of the Dominicans, he promoted members of both orders to diplomatic posts and bishoprics. By his bull Exiit qui seminat (14 Aug. 1279) he tried to settle the interpretation of absolute poverty for the Franciscans on the basis of a distinction, derived from the Franciscan theologian Bonaventura (c.1217–74), between total lack of possessions, declared meritorious, and the ‘moderate use’ of things necessary to life and the fulfilment of one's vocation. Christ and the apostles, he declared, owned nothing, neither individually or in common, and he went on to forbid further discussion of the issue. Among other works, he carried out a radical restoration of St Peter's, and (the first pope to do so) made the Vatican palace his residence, enlarging and remodelling it and purchasing plots to form its gardens.