Upon the death of Haakon V (King of Norway) in 1319, Magnus Erikson, at just three years old, inherited the throne as King Magnus VII of Norway. At the same time, a movement to make Magnus King of Sweden proved successful, and both the kings of Sweden and of Denmark were elected to the throne by their respective nobles, Thus, with his election to the throne of Sweden, both Sweden and Norway were united under King Magnus VII.