Pedro Martínez de Luna y Pérez de Gotor, known as el Papa Luna in Spanish, was an Aragonese nobleman, who as Benedict XIII, is considered an antipope by the Catholic Church.
In 1377 Pedro de Luna and the other cardinals returned to Rome with Pope Gregory, who had been persuaded to leave his papal base at Avignon by Catherine of Siena. After Gregory's death on 27 March 1378, the people of Rome feared that the cardinals would elect a French Pope and return the papacy to Avignon. Consequently, they rioted and laid siege to the cardinals, insisting on an Italian Pope. The conclave duly elected Bartolomeo Prignano, Archbishop of Bari, as Urban VI on 9 April, but the new Pope proved to be intractably hostile to the cardinals. Some of them reconvened at Fondi in September 1378, declared the earlier election invalid and elected Robert of Geneva as their new Pope, initiating the Western Schism. Robert assumed the name Clement VII and moved back to Avignon.
Clement VII sent him as legate to Spain for the Kingdoms of Castile, Aragon, Navarre, and Portugal, in order to win them over to the obedience of the Avignon pope. Owing to his powerful relations, his influence in the Province of Aragon was very great. In 1393 Clement VII appointed him legate to France, Brabant, Flanders, Scotland, England, and Ireland. As such he stayed principally in Paris, but he did not confine his activities to those countries that belonged to the Avignon obedience. Following Clement's death on 16 September 1394, the cardinals met at Avignon. The conclave consisted of 11 French cardinals, eight Italians, four Spaniards, and one from Savoy, all proclaiming the ardent wish to reunite the church. The cardinals then elected Luna as the new pope, on the condition that he should labor to quell the schism, and should resign the papal dignity whenever the pope of Rome should do the same, or the college of cardinals demand it.
On the death of Urban VI in 1389 the Roman College of Cardinals had chosen Boniface IX; the election of Benedict therefore perpetuated the Western Schism. At the start of his term of office, de Luna was recognised as Pope by France, Scotland, Sicily, Castile, Aragon, Navarre, and Portugal. In 1396 Benedict sent Sanchez Muñoz, one of the most loyal members of the Avignon curia, as an envoy to the Bishop of Valencia to bolster support for the Avignon papacy in the Crown of Aragon.
In 1415 the Council of Constance brought this clash between papal claimants to an end. Gregory XII and Baldassare Cossa, who had succeeded Philarghi as the Pisan papal contender in 1410 and had assumed the name John XXIII, both agreed to resign. Benedict, on the other hand, refused to stand down.
Finally, Holy Roman Emperor Sigismund of Luxemburg organised a European summit in Perpignan, to convince Benedict to resign his office and end the Western Schism. On 20 September 1415, the Emperor met with Benedict at the Palace of the Kings of Majorca, accompanied by King Ferdinand I of Aragon, delegates of the Counts of Foix, Provence, Savoy, and Lorraine, embassies from the Kings of France, England, Hungary, Castile, and Navarre, and the Church's representative at the Council of Constance. Benedict still refused to resign, clashing with the Emperor, who left Perpignan on 5 November.
Because of this stubbornness, the Council of Constance declared Benedict a schismatic and excommunicated him from the Catholic Church on 27 July 1417. Benedict, who had lived in Perpignan from 1408 to 1417, now fled to the castle of Peniscola, near Tortosa, in the Kingdom of Aragon. He still considered himself the true Pope. His claim was now only recognized in the kingdom of Aragon, where he was given protection by King Alfonso V. Benedict remained at Peñíscola from 1417 until his death there on 23 May 1423.
The day before his death, Benedict appointed four cardinals of proven loyalty to ensure the succession of another Pope who would remain faithful to the now beleaguered Avignon line. Three of these cardinals met on 10 June 1423 and elected Sanchez Muñoz as their new Pope, with Muñoz assuming the papal name of Clement VIII. The fourth cardinal, Jean Carrier, the archdeacon of Rodez near Toulouse, was absent at this conclave and disputed its validity, whereupon Carrier, acting as a sort of one man College of Cardinals, proceeded to elect Bernard Garnier, the sacristan of Rodez, as Pope, with Garnier taking the name Benedict XIV.