The significance and wealth of the city at the end of the 14th century was mirrored by the decision to build an entirely new church on the grounds of the previously destroyed smaller St. Elisabeth Church. The construction of the biggest cathedral in the Kingdom of Hungary – St. Elisabeth Cathedral – was supported by Emperor Sigismund, and by the apostolic see itself. Since the beginning of the 15th century, the city played a leading role in the Pentapolitana – the league of towns of five most important cities in Upper Hungary (Bártfa, Locse, Kassa, Eperjes, and Kisszeben). During the reign of King Hunyadi Mátyás the town reached its medieval population peak. With an estimated 10,000 inhabitants, it was among the largest medieval cities in Europe.