At this time Pope Boniface died, and was succeeded by Innocent VII. The people of Rome supplicated him to restore to them their fortresses and their liberty; but as he would not consent to their petition, they called to their assistance Ladislaus, king of Naples. Becoming reconciled to the people, the pope returned to Rome, and made his nephew Lodovico count of La Marca. Innocent soon after died, and Gregory XII. was created, upon the understanding to renounce the papacy whenever the anti-pope would also renounce it. By the advice of the cardinals, in order to attempt the reunion of the church, Benedict, the anti-pope, came to Porto Venere, and Gregory to Lucca, where they made many endeavors, but effected nothing. Upon this, the cardinals of both the popes abandoned them, Benedict going to Spain, and Gregory to Rimini. On the other hand, the cardinals, with the favor of Balthazar Cossa, cardinal and legate of Bologna, appointed a council at Pisa, where they created Alexander V., who immediately excommunicated King Ladislaus, and invested Louis of Anjou with the kingdom; this prince, with the Florentines, Genoese, and Venetians, attacked Ladislaus and drove him from Rome. In the head of the war Alexander died, and Balthazar Cossa succeeded him, with the title of John XXIII. Leaving Bologna, where he was elected, he went to Rome, and found there Louis of Anjou, who had brought the army from Provence, and coming to an engagement with Ladislaus, routed him. But by the mismanagement of the leaders, they were unable to prosecute the victory, so that the king in a short time gathered strength and retook Rome. Louis fled to Provence, the pope to Bologna; where, considering how he might diminish the power of Ladislaus, he caused Sigismund, king of Hungary, to be elected emperor, and advised him to come to Italy. Having a personal interview at Mantua, they agreed to call a general council, in which the church should be united; and having effected this, the pope thought he should be fully enabled to oppose the forces of his enemies.
At this time there were three popes, Gregory, Benedict, and Giovanni, which kept the church weak and in disrepute. The city of Constance, in Germany, was appointed for the holding of the council, contrary to the expectation of Pope John. And although the death of Ladislaus had removed the cause which induced the pope to call the council, still, having promised to attend, he could not refuse to go there. In a few months after his arrival at Constance he discovered his error, but it was too late; endeavoring to escape, he was taken, put into prison, and compelled to renounce the papacy. Gregory, one of the anti-popes, sent his renunciation; Benedict, the other, refusing to do the same, was condemned as a heretic; but, being abandoned by his cardinals, he complied, and the council elected Oddo, of the Colonnesi family, pope, by the title of Martin V. Thus the church was united under one head, after having been divided by many pontiffs.