He succeeded Pope Clement IV (1265–68) after the papal chair had been vacant for three years (1268–71) due to divisions among the cardinals; the equally split French and Italian cardinals wanted a Pope from their country due to the ongoing political situation with Charles of Anjou. The deadlock was finally broken when the citizens of Viterbo, where the cardinals were assembled, removed the roof from the building where the cardinals were meeting and locked them in, only allowing them bread and water; three days later, Pope Gregory X was elected by the papal election, 1268–1271, the longest papal election in the history of the Roman Catholic church. Gregory X was considered a strong choice because although he was Italian, he had spent most of his career north of the Alps and thus had not been embroiled in recent Italian political controversies.
His election came as a complete surprise to him, occurring while he was engaged in the Ninth Crusade to Acre with Edward I of England (1239 - 1307) in Palestine. Not wanting to leave his mission, his first action as Pope was to send out appeals for aid to the Crusaders, and at his final sermon at Acre just before leaving to sail for Italy he famously said "If I forget thee, O Jerusalem, let my right hand forget her cunning."
On his arrival at Rome his first act was to summon the council which met at the Second Council of Lyons in 1274 for the purpose of considering the East-West Schism, the condition of the Holy Land, and the abuses of the Roman Catholic Church. It was while returning from that council that he died at Arezzo, where he is still buried inside the Cathedral Church, on January 10, 1276. To him is due the bull which, subsequently incorporated into the code of canon law, regulated all conclaves for papal elections until the reforms of Pope Paul VI (1963–78).
He was succeeded by Pope Innocent V.
As soon as he was elected in 1271, Pope Gregory received a letter from the Mongol Khan Kubilai, remitted by Niccolo and Maffeo Polo following their travels to his court in Mongolia. Kubilai was asking for the dispatch of a hundred missionaries, and some oil from the lamp of the Holy Sepulcher. The new Pope could spare only two friars and some lamp oil. The friars turned back soon after the party left for Mongolia. The two Polos (this time accompanied by the young Marco Polo) returned to Mongolia, and remitted the oil from the Pope to Kubilai in 1275.
The Mongol Ilkhanate leader Abaqa sent a delegation with over a dozen members to the 1274 Council of Lyon, where plans were made for possible military cooperation between the Mongols and the Europeans. After the Council, Abaqa sent another embassy, led by the Georgian Vassali brothers, to further notify Western leaders of military preparations. Gregory answered that his legates would accompany the Crusade, and that they would be in charge of coordinating military operations with the Il-Khan. However, these projects of a major new Crusade essentially came to a halt with the death of Gregory X on January 10, 1276. The money which had been saved to finance the expedition was instead distributed in Italy.