or "the great controversy of the antipopes" by some Catholic scholars and "the second great schism" by many secular and Protestant historians. Parties within the Catholic Church were divided in their allegiance among the various claimants to the office of pope. The Council of Constance finally resolved the controversy in 1417 when the election of Pope Martin V was accepted by all. Avignon and the small enclave to the east (Comtat Venaissin) remained part of the Papal States until 1791 when, under pressure from French Revolutionaries, they were absorbed by the short-lived revolutionary Kingdom of France (1791–92), which, in turn, was abolished in favor of the French First Republic the following year. Background Temporal role of the Roman Church The papacy in the Late Middle Ages played a major temporal role in addition to its spiritual role. The conflict between the Pope and the Holy Roman Emperor was fundamentally a dispute over which of them was the leader of Christendom in secular matters. In the early 14th century, the papacy was well past the prime of its secular rule – its importance had peaked in the 12th and 13th centuries. The success of the early Crusades added greatly to the prestige of the Popes as secular leaders of Christendom, with monarchs like those of England, France, and even the Holy Roman Emperor merely acting as marshals for the popes and leading "their" armies. One exception was Frederick II, Holy Roman Emperor, who was twice excommunicated by the Pope during a Crusade. Frederick II ignored this and was moderately successful in the Holy Land. King Philip IV of France wanted to use the finances of the Church to pay for his war with the English. Pope Boniface VIII protested, leading to a feud. This state of affairs culminated in the unbridled declaration of papal supremacy, Unam sanctam, in November 1302. In that papal bull, Pope Boniface VIII decreed that "it is necessary to salvation that every human creature be subject to the Roman pontiff." This was directed primarily to King Phillip IV of France who responded by saying, "Your venerable conceitedness may know that we are nobody's vassal in temporal matters." In 1303 AD, Pope Boniface VIII followed up with a bull that would excommunicate the king of France and put an interdict over all France. Before this was finalized, Italian allies of the King of France broke into the papal