King Magnus VII rules Norway until 1350,…
1252 CE to 1395 CE
In 1363, Haakon VI marries Margaret, the daughter of King Valdemar IV of Denmark.
Upon the death of Haakon VI, in 1379, his son, Olaf IV, is only ten years old.
Olaf had already been elected to the throne of Denmark, as Olaf II, on May 3, 1376.
Thus, upon Olaf's accession to the throne of Norway, Denmark and Norway enter personal union.
Olaf's mother and Haakon's widow, Queen Margaret, manages the foreign affairs of Denmark and Norway during the minority of Olaf.