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. As King Wenceslaus I of Bohemia wanted to take control over the duchies south of his realm, he arranged for the wedding of his eldest son and heir, Margrave Vladislaus III of Moravia, with Gertrude. The couple was even proclaimed Duke and Duchess of Austria, but Vladislaus died in the following year (1247). The next ruler of Austria was Gertrude's second husband, Margrave Herman VI of Baden, who died in 1250, leaving Austria and Styria princeless again. Second marriage The Austrian aristocracy offered the government of the duchies to King Wenceslaus' second son and new heir apparent Ottokar II. However, one condition was imposed by the nobles: Ottokar could only take control of Austria and Styria if he married one of the Babenberg heiresses. Ottokar refused to marry his brother's widow, such marriage being prohibited by the Book of Leviticus, and decided to marry Margaret, 26 years his senior. The ceremony took place on 11 February 1252 in the Castle Chapel (German: Burgkapelle) of Hainburg an der Donau. Ottokar acquired the imperial privileges sealed with a Golden Bull on the basis of the Privilegium Minus, acknowledged by Emperor Frederick II, which legitimized his claim over Austria and Styria, since Margaret was the heiress of the last duke by proximity of blood. Thereby she transferred the government of the duchies to Austria and Styria to her husband. Pope Innocent IV, who had previously changed sides several times between Gertrude and Margaret, confirmed the lawful government of Ottokar over both duchies on 6 May 1252. Bohemian administrators ruled the duchies in his name. One year later, on 23 September 1253, King Wenceslaus I died, and Ottokar and Margaret became King and Queen of Bohemia. Once he had obtained the Babenberg duchies, it was evident to Ottokar that Margaret, already 50 years old, would not bear children. The king tried to gain from the Pope the recognition of the illegitimate son whom he had with Agnes of Kuenring, one of Margaret's ladies-in-waiting, as his lawful successor. After the Pope refused this, in 1261 Ottokar obtained