In 1246 Margaret's brother Duke Frederick II of Austria, last scion of the Babenberg dynasty, died childless in the Battle of the Leitha River, leaving a succession crisis. The two principal claimants over the succession in the duchies of Austria and Styria were two women: Margaret (who, as the eldest sister of the late Duke, claimed proximity of blood) and her niece Gertrude, who claimed primogeniture, as the only daughter of Henry of Mödling, the eldest brother of the late Duke Frederick II, who had predeceased their father Duke Leopold VI.