Mary was crowned "king" of Hungary on 17September 1382, seven days after Louis the Great's death. Her mother, who assumed regency, absolved the Polish noblemen from their oath of loyalty to Mary in favor of Mary's younger sister, Jadwiga, in early 1383. The idea of a female monarch remained unpopular among the Hungarian noblemen, the majority of whom regarded Mary's distant cousin, Charles III of Naples, as the lawful king. To strengthen Mary's position, the queen mother wanted her to marry Louis, the younger brother of Charles VI of France. Their engagement was announced in May 1385.

Charles III of Naples landed in Dalmatia in September 1385. Sigismund of Luxembourg invaded Upper Hungary (now Slovakia), forcing the queen mother to give Mary in marriage to him in October. However, they could not prevent Charles from entering Buda. After Mary renounced the throne, Charles was crowned king on 31December 1385, but he was murdered at the instigation of Mary's mother in February 1386. Mary was restored, but the murdered king's supporters captured her and her mother on 25July. Queen Elizabeth was murdered in January 1387, but Mary was released on 4June 1387. Mary officially remained the co-ruler with Sigismund, who had meanwhile been crowned king, but her influence on the government was minimal. She and her premature son died after her horse threw her during a hunting trip.

Louis summoned the Polish prelates and lords to Kassa (now Košice in Slovakia) in September 1379, persuading them to acknowledge Mary's right to succeed him in Poland.[5][12] The contemporaneous Jan of Czarnków, who was biased against Louis, recorded that the Poles yielded to the monarch's demand only after he had prevented them from leaving the town by shutting its gates.[5][13] At a meeting with Leopold III, Duke of Austria in early 1380, Louis strongly hinted that he would bequeath Hungary to his younger daughter, Jadwiga, who had been engaged to LeopoldIII's son, William.[14] Upon Louis's demand, a delegation of the Polish noblemen again paid homage to Sigismund and Mary on 25July 1382.[15] According to the historian Oscar Halecki, Louis wished to divide his kingdoms between his two surviving daughters, [16] but Pál Engel and Claude Michaud write that the ailing king wanted to bequeath both Hungary and Poland on Mary and Sigismund.[5][17]

Louis the Great died on 10 September 1382.[18] Cardinal Demetrius, Archbishop of Esztergom, crowned Mary "king" with the Holy Crown of Hungary in Székesfehérvár on 17September, a day after her father's burial.[1][19] Mary's title and her rapid coronation in the absence of her fiancé, Sigismund, show that her mother and her mother's supporters wanted to emphasize Mary's role as monarch and to postpone or even hinder Sigismund's coronation.[20]

Noblemen from Greater Poland offered to pay homage to either Mary or Jadwiga at a meeting in Radomsko on 25November, but they stipulated that the queen and her husband should live in Poland.[28] The assembly of the nobility of Lesser Poland passed a similar resolution in Wiślica on 12December.[28] On the latter occasion, in response to Queen Elizabeth's demand, the noblemen also promised that they would not pay homage to anyone else than either Mary or Jadwiga.[28][29] Mary's fiancé, Sigismund, who had stayed in Poland, returned to Hungary.[29]Bodzanta, Archbishop of Gniezno, the Nałęcz family, and their allies in Greater Poland favored a native prince, SiemowitIV of Masovia.[28] To avoid a civil war,[19] Queen Elizabeth sent envoys to the Polish noblemen's next assembly which met in Sieradz in late February 1383.[30] Her envoys absolved the Poles from their 1382 oath of loyalty to Mary on 28March, announcing that the queen mother would send her younger daughter, Jadwiga, to Poland.[30][31]

Mary's royal seal

John of Palisna, Prior of Vrana, rose up in open rebellion against the rule of Mary and her mother in the spring of 1383.[31][32][33] The queens made Stephen LackfiBan of Croatia.[26] The royal army marched to Croatia and laid siege to Vrana, forcing John of Palisna to flee to Bosnia.[31][32] The defenders of Vrana surrendered to Mary, who had been present during the siege along with her mother, on 4November.[31] To strengthen Mary's position against Charles of Naples, Queen Elizabeth sent her envoys to France and opened negotiations on the marriage of Mary to the younger brother of CharlesVI of France, Louis, who had once been engaged to Mary's sister, Catherine.[34] Mary and the queen mother only left Croatia and Slavonia early next year.[35] Queen Elizabeth replaced Stephen Lackfi with Thomas Szentgyörgyi, who used draconian measures to put an end to a conspiracy against the queens in Zadar in May 1384.[36]

Although the last Diet was held in the early 1350s, the queens convoked a Diet to deal with the grievances of the noblemen.[26] Mary confirmed her father's decrees of 1351 summarizing the noblemen's privileges on 22June 1384.[26] The negotiations of Mary's marriage in France caused a new rift within the Hungarian nobility, because the Lackfis, Nicholas Zámbó and Nicholas Szécsi and other high officers, who had been appointed during Louis the Great's reign, continued to support Mary's fiancé, Sigismund, in accordance with Louis the Great's will.[37] The queen mother replaced them with Nicholas Garai's supporters in August 1384.[38] The prelates were also opposed to the French marriage, because the French supported Clement VII whom the Hungarian clergy considered an antipope.[39] Mary's sister, Jadwiga, went to Poland where she was crowned on 16October 1384.[18][40] Cardinal Demetrius, who had accompanied Jadwiga to Poland, remained absent from the queens' court after his return to Hungary.[41] The royal government could not properly function during his absence because he was the keeper of the royal seal.[41]

Louis I of Anjou died on 10 September 1384, enabling his rival, CharlesIII of Naples, to stabilize his rule in Southern Italy during the next months.[42][38] The consolidation of CharlesIII's position in Naples also contributed to the formation of a party of noblemen who supported his claim to Hungary.[38][43]John Horvat, Ban of Macsó (now Mačva in Serbia), and his brother, Paul, Bishop of Zagreb, were the leading figures of their movement.[44] Sigismund of Luxembourg tried to persuade the queen mother to consent to his marriage to Mary, but she refused him.[45] He left Hungary in early 1385.[35]

The queens and their supporters initiated negotiations with the representatives of the opposition, but no reconciliation was reached at their meeting in Požega in the spring of 1385.[46][47] After a French delegation came to Hungary in May 1385, Mary was engaged to Louis of France.[48] Louis of France thereafter signed his letters "Louis of France, King of Hungary", according to Jean Froissart.[48] In the same month, the queen mother dismissed Stephen Lackfi, accusing him of high treason.[49] She also sent letters to Zagreb and other places in the kingdom, forbidding the local inhabitants to support Lackfi, Nicholas Szécsi, Bishop Paul Horvat and their relatives.[49] John and Paul Horvat and their allies formally offered the crown to CharlesIII of Naples and invited him to Hungary in August.[35][50] In the same month, Mary confirmed TvrtkoI of Bosnia's acquisition of Kotor in Dalmatia.[51] Sigismund stormed into Upper Hungary, accompanied by his cousins, Jobst and Prokop of Moravia, and occupied Pozsony County.[35][38] The queen mother replaced Nicholas Garai with Nicholas Szécsi, and made Stephen Lackfi voivode of Transylvania and Nicholas Zámbó master of the treasury.[52]

Charles III of Naples landed at Senj in Dalmatia in September 1385 and marched to Zagreb.[51] Sigismund of Luxembourg came to Buda and persuaded the queen mother to give her consent to his marriage to Mary.[51][38] The marriage took place in Buda in October, but Sigismund was not crowned king and received no governmental function.[38][53] The queen mother convoked a new Diet and Mary again confirmed the noblemen's liberties, but the queens' rule remained unpopular.[53] Sigismund left Buda and mortgaged the territories west of the River Vág to his Moravian cousins.[53] Charles of Naples had meanwhile left Zagreb, stating that he wanted to restore peace and public order in Hungary.[53]

Many noblemen joined Charles of Naples who marched towards Buda.[54] Mary and her mother received him ceremoniously before he reached Buda, and he entered the capital in the two queens' company in early December 1385.[55][56] Mary renounced the crown without resistance in the middle of December out of fear that Charles would kill her.[55] Charles first adopted the title governor, but the Diet elected him king.[57] Charles was crowned king of Hungary in Székesfehérvár on 31December.[18] According to the contemporaneous Lorenzo de Monacis, Mary and her mother, who attended Charles's coronation, visited Louis the Great's tomb during the ceremony where they burst into tears because of their ill fate.[57]

Charles did not detain Mary and her mother who continued to live in the royal palace in Buda.[58] Queen Elizabeth and Nicholas Garai decided to get rid of Charles.[59][60][61] They persuaded Blaise Forgách, the master of the cupbearers, to join them, promising him the domain of Gimes (now Jelenec in Slovakia) if he murdered the king.[62] Upon Queen Elizabeth's request, Charles visited her and her daughter on 7February 1386.[62] During the meeting, Blaise Forgách attacked the king, seriously injuring him on the head.[62][63] The wounded King Charles was carried to Visegrád where he died on 24February.[59]

Mary was restored to the throne, with her mother ruling in her name.[61] The queen mother informed the citizens of Kőszeg already on 14February that "Queen Mary had regained the Holy Crown".[64] However, the Horvat brothers rose up in open rebellion on behalf of the murdered king's son, Ladislaus of Naples.[65] Mary's husband, Sigismund, and his brother, Wenceslaus, invaded Upper Hungary in April.[18] After weeks of negotiations, the queens acknowledged Sigismund's position as consort in a treaty which was signed in Győr in early May.[59][66] They also confirmed Sigismund's mortgage of the lands west of the Vág to Jobst and Prokop of Moravia.[66] After the treaty was signed, the queens returned to Buda and Sigismund went to Bohemia, suggesting that he was dissatisfied with the treaty.[67]

Queen Elizabeth, who according to the 15th-century historian Johannes de Thurocz was "driven by folly", decided to visit the southern counties of the kingdom that were controlled by supporters of Ladislaus of Naples.[59][65] The queen mother and Mary set out for Đakovo, accompanied by Nicholas Garai and a modest following around 15July.[65][59][68] However, John Horvát, John of Palisna and their retainers ambushed and attacked the queens and their retinue at Gorjani on 25July.[59][65] The queens' small entourage fought the attackers, but all were killed or captured.[69] Blaise Forgách and Nicholas Garai were beheaded and their heads were thrown into the queens' carriage.[70] Elizabeth took all blame for the rebellion and begged the attackers to spare her daughter's life, according to Johannes deThurocz's account.[70][71]

Mary and her mother were imprisoned.[65] They were held in captivity in Gomnec Castle, which was a fortress of the Bishopric of Zagreb.[72] In the queens' absence, the barons of the realm convoked a Diet under the newly carved "seal of the regnicoles".[59] On Queen Mary's behalf, they promised a general pardon, but the Horvats refused to submit.[59] The two queens were dragged to Krupa, and from there to Novigrad Castle on the coast of the Adriatic Sea.[65][72] The barons or the Diet elected Stephen Lackfi palatine and made Sigismund of Luxembourg regent.[73] John Horvat's henchmen strangled Queen Elizabeth in Mary's presence in early January.[73] In the same month, Sigismund invaded Slavonia, but could not defeat the rebels.[73][68]

Taking advantage of the anarchy in Hungary, Polish troops invaded Lodomeria and Halych in February.[74] Only Vladislaus II of Opole, who claimed the two realms for himself, protested against their action.[75] Sigismund was crowned king on 31March as it was decided that the kingdom could no longer be without an effective ruler.[73] One of his supporters, Ivan of Krk, laid siege to Novigrad Castle with the assistance of a Venetian fleet, which was under the command of Giovanni Barbarigo.[65][76] They captured the castle and liberated Mary on 4June 1387.[77] She was especially grateful to Barbarigo; she knighted him and granted an annuity of 600 golden florins to him.[77]

Mary met her husband in Zagreb on 4July.[68] She officially remained Sigismund's co-ruler until the end of her life, but her influence on government was minimal.[78] Sigismund's land grants were always confirmed with Mary's own great seal during the first year of their common rule, but thereafter the grantees rarely sought her confirmation.[77] Royal charters counted her regnal years not from her ascension, but from her husband's coronation.[77] Nevertheless, Mary persuaded her husband to torture and execute John Horvat who was captured in July 1394 although Sigismund would have been willing to spare his life.[79][80]

Mary was pregnant when she decided to venture out alone on a hunt in a Buda forest on 17May 1395.[61] Her horse tripped, threw her and landed on top of her.[81] The trauma induced labor and she gave birth prematurely to a son.[61] The queen succumbed to the fatal injuries; being far from any kind of assistance, her son died as well.[61] She was buried in the cathedral of Várad (now Oradea in Romania).[1] Mary's sister, Jadwiga, claimed the crown, but Sigismund retained it without much difficulty.[78][82]