When Margaret's first cousin King Inge the Younger died, Magnus claimed the throne as the eldest grandson of King Inge the Elder and reigned as King Magnus I of Sweden.
Following King Inge the Younger's death, Magnus, being the eldest grandson of King Inge the Elder, inherited the Swedish throne and reigned as King Magnus I.