After the end of the Avignon Papacy, the election of Gregory XI's successor (Urban VI) is contested, with a group of cardinals instead electing Clement VII as a rival claimant. Clement VII moves his papal court back to Avignon, beginning an extended period of turmoil and multiple popes/antipopes.
The 1409 Council of Pisa declared both popes heretical, electing a third pope (Alexander V).
Finally, at the Council of Constance (1414-1418), the Roman and Pisan popes renounced their claims while the Avignon pope was excommunicated. Martin V was elected in their place and returned to Rome, ending the schism.