Sigismund faced fierce struggles for power leading up to the foundation of the order in 1418. In 1387, the Bohemian royal son Sigismund of Luxembourg was elected King of Hungary and Croatia, a title which he owed chiefly to his marriage to Queen Mary of Hungary in 1385, without her consent.
During the next decade, he constantly sought support or employed ruthless methods to strengthen his unsteady hold on the throne. His rule was weakened in 1395 when Mary, who was pregnant, died in a horse riding accident. In 1389, the Ottoman Sultan Murad I fought Lazar, Prince of Serbia at the Battle of Kosovo Polje, in which both leaders died, leading to an uncertain outcome of the battle. Two years later, the Turks had taken the Bulgarian fortress of Nicopolis.
In 1396, Pope Boniface IX proclaimed a crusade against the Ottomans, and a campaign was organised to recapture the fortress and put a halt to the Ottoman expansion. Sigismund was nominally in charge; however, in the 1396 Battle of Nicopolis the French leader, John of Nevers, commanded the French half of the forces and ignored Sigismund's entreaties by charging the Turks. About 15,000 crusaders died with only a few leaders, including Sigismund, escaping. Sigismund returned to Hungary in 1401 and, facing a number of revolts, gradually resumed control and re-asserted himself as the King of Hungary. This was achieved by allying himself with the political party of Stibor of Stiboricz, Nicholas II Garay, and Hermann II of Celje, in return for their military support, which enabled him to fight off domestic rivals. Sigismund campaigned against the Croats and Bosnians, which culminated in 1408 with the Battle of Dobor—fought for the possession of Bosnia—and a massacre of noble families. His pact with Hermann II was secured in 1408, when Sigismund married Herman II's daughter Barbara of Celje (also called Cilli).