In 1401 Ernest accompanied King Rupert of Germany on his campaign to Italy. When their elder brother William died in 1406, the remaining three sons of Leopold III agreed about the partition of their patrimony: In the separation agreement of 1406, Ernest received Styria, Carinthia and Carniola, and jointly with his elder brother Leopold IV (the current head of the Leopoldian line) held the guardianship over their minor nephew Albert V of Austria, grandson of Duke Albert III. Tyrol and Further Austria passed to the youngest brother Frederick IV.