Louis I, King of Poland, Hungary, and Croatia, had no sons. His first marriage of about five years ended without children when his wife died. His second wife, Elizabeth of Bosnia (not to be confused with his mother, Elizabeth of Poland), was childless for the first seven years of their marriage before having three daughters in a span of four years: Catherine, Mary, and Hedwig. Rather than petition for divorce or have his wife beheaded like some kings, Louis I ensured his daughters would inherit his throne.
Louis first heir Catherine was born in 1370 and died in 1378 before ascending to the throne. In 1374 her father had required Polish nobles to swear oaths of loyalty to Catherine, and arranged a marriage for his infant daughter Hedwig to the toddler William, future Duke of Austria. Louis next persuaded Polish lords to swear loyalty to his second daughter Mary, who was betrothed to Sigismund of Luxemburg in 1380. By the time of King Louis’ death in 1382, he had his succession ensured.
Seven days after he passed, Queen Elizabeth of Bosnia had her daughter Mary crowned King of Hungary. This effectively made her the regent of the 12-year-old monarch, rather than Mary’s fiancé Sigismund. Polish nobles feared the foreign fiancés of the young rulers would not prioritize Polish interests, and a few possible contenders for the crown made rumbles. Elizabeth proposed a shrewd compromise.
She would release Polish nobles from their vows to Mary and crown Hedwig as King of Poland, on the condition Hedwig would return to Buda, Hungary with her mother and sister until she reached her twelfth birthday. This would have extended her regency another three years. Meeting in secret, many of the nobles supported making Siemowit of Mosovia king by marriage to Hedwig, on the condition she remained in Poland after her coronation.
When Hedwig was delayed in meeting their deadline for her return to Poland, Siemowit and his supporters took up arms, advancing toward the heart of the kingdom. His supporters attempted to crown him in August of that year, but the archbishop would not perform the coronation ceremony. A crown is just a fancy hat without a coronation.