On his return to Norway, Hardrada reached an agreement with Magnus I that they would share the rule of Norway. On 1047, King Magnus died and Harald became sole ruler of Norway.