The study of Papal history is fascinating!
A dispute in 1378 resulted in there eventually being THREE men who all claimed to be pope. The conflict was not resolved until 1417. Until then, all three popes claimed to be the only legitimate leaders of the Catholic church.
The conflict began in 1378 with the death of Pope Gregory XI. Gregory XI had been the last of the Avignon popes. These were popes who held power while the papacy was located in Avignon, France. Gregory had just relocated the papacy back to Rome in 1377, when he died the following year. After his death, the citizens of Rome rioted in the street, demanding that a Roman be chosen as the next pope since the papacy had been essentially controlled by the French for almost seventy years. There were no Roman candidates, however, so they chose the Archbishop of Bari from Naples who took the name Pope Urban VI
The cardinals soon became unhappy with their choice when Urban VI proved to be a bad choice, so most of the college of cardinals met in Anagni where they elected a new pope, Pope Clement VII. Pope Clement VII set up his papacy back in Avignon, but Urban VI and his supporters refused to acknowledge him as the legitimate pope. Some people supported Urban VI in Rome as the legitimate pope while others supported Clement VII as the legitimate pope. Furthermore, support for these two rival popes often depended on one’s nationality. The French and their allies support the Avignon pope while those who resented France’s influence on the papacy supported the pope in Rome. The schism continued after the death of the two popes as each camp elected its own pope.
In 1409, some church leaders hoped to resolve the conflict by holding a church counsel in Pisa. Those in attendance elected a third pope, Alexander V, who was supposed to replace the other two. They refused to acknowledge his legitimacy, however, so there were now three popes all claiming to be the only legitimate leader of the Catholic Church.
In 1414, the conflict was finally resolved when the Council of Constance met and deposed Alexander V’s successor and the Avignon pope and received a formal resignation from the Roman pope. They were then able to elect a new pope, Martin V, that everyone acknowledged as legitimate. Today, the Catholic church recognizes only the original Roman line that started with Urban VI. It has declared the others, antipopes.