Cardinal Benedict Gaetani, a canon lawyer and diplomat from a leading Roman family who had spent many years working his way up in the papal government, was chosen pope in 1294 to replace the elderly Celestine V, a saintly former hermit who found himself totally out of his depth. Boniface, who had encouraged Celestine to resign, locked the old man away in a castle, where he died before long. The new pope quickly found himself in conflict with Philip IV (the Fair) of France and Edward I of England. The strong-minded rulers of these developing European nation-states would not allow undue papal meddling in their affairs and were supported by many of their clergy. Already in 1296 Boniface issued a bull forbidding governments to tax the clergy without papal permission, but he had to drop it against Philip the Fair's countermeasures and a suspiciously convenient rising against Boniface by the Colonna family in Rome, which took time to put down.

In 1301 King Philip had a French bishop tried for treason and imprisoned. This was intolerable and Boniface issued a reproving bull, which in 1302 was decisively rejected by the Estates General, even the French clergy supporting their king. Boniface announced that he would depose Philip if need be and issued the bull Unam Sanctam(‘One Holy’),the most famous papal document of the Middle Ages, affirming the authority of the pope as the heir of Peter and Vicar of Christ over all human authorities, spiritual and temporal. Spiritual power, according to the bull, rests in the hands of the Church. Temporal power is in the hands of kings and soldiers, but is to be exercised only as the Church permits, because things spiritual are superior to things temporal. If temporal power errs, it is to be judged by the spiritual power. If lesser spiritual power errs, it is to be judged by higher spiritual power all the way up to the supreme spiritual power, the papacy itself, which can be judged only by God. 'We declare, state and define that it is absolutely necessary for salvation that every human creature be subject to the Roman Pontiff.'

The pope went on in 1303 to confirm the disputed choice of Albert of Hapsburg as Holy Roman Emperor and announce that the emperor was overlord of all other rulers, including the king of France. Under the ultimate supremacy of the pope.

Boniface may not have made any greater claims for papal authority than canon lawyers and some of his predecessors had made before him, but he was shouting vigorously against the wind. King Philip's response was to accuse him of crimes from heresy and blasphemy to simony and sodomy, and send his henchman Guillaume de Nogaret to Italy to stir up another rebellion against the pope. In September, with the help of the Colonnas and some of the cardinals, Boniface was seized, threatened with death and manhandled at his summer residence at Anagni. The townspeople rescued him two days later, but the shock broke him physically and psychologically, and he died in Rome soon afterwards, in October. Clement V, who became pope two years later, was French and in 1309 the throne of Peter was moved from Rome to Avignon in France.