Claim to Austria
He was born in Austrian Alland, the only son of the Swabian margrave Herman VI of Baden (c.1226–1250) and his wife Gertrude (1226–1288), niece and heiress of the late Babenberg duke Frederick II of Austria.
As Duke Frederick II of Austria had been killed at the 1246 Battle of the Leitha River, the ducal line of the Babenberg dynasty had become extinct. Margrave Herman VI of Baden, through his marriage with Gertrude, had raised inheritance claims to the Austrian and Styrian possessions. However, after the death of Emperor Frederick II in 1250, no strong Imperial authority existed to assert his title. Though he was backed by Pope Innocent IV and anti-king William of Holland, Herman could not prevail against the claims raised by the mighty Přemyslid king Wenceslaus I of Bohemia and his warlike son Ottokar II.
At the time of the death of his father, young Frederick stayed at the Meissen court, where his mother Gertrude had fled. He could succeed Margrave Herman in Baden, with his uncle Rudolf I acting as regent. Also claimant to the Austrian and Styrian duchies through his mother, Frederick took his residence near Vienna. However, when in 1252 Ottokar II married Gertrude's aunt Margaret and moved into Austria, he again had to flee, at first to Styria and later to the Sponheim court in Carinthia.