Olaf was a son of King
Harald Hardrada and
Tora Torbergsdatter. Olaf joined his father during the
invasion of England during 1066. However, he was only 16 years old during the
Battle of Stamford Bridge on 25 September 1066. He stayed guarding the ships at
Riccall and did not participate in the fighting. After the Norwegian defeat, he sailed with the remains of the Norwegian strike force back to
Orkney, where they wintered. The return journey to Norway took place in summer 1067. After the death of his father, Olaf shared the kingdom with his brother
Magnus II (
Magnus 2 Haraldsson) who had become king the previous year. When King Magnus died during 1069, Olaf became the sole ruler of Norway. During his reign, the nation of Norway experienced a rare extended period of peace. He renounced any offensive foreign policy, instead protecting Norway's sovereignty through agreements and marriage connections. Domestically he emphasized the church's organization and the modernization of the kingdom. The latter resulted in, among other things, the reorganization of the
body-guard and of measures under which key cities, especially
Bergen, could better serve as a royal residence. According to the
Heimskringla by
Snorri Sturluson, Olaf is said to have founded the city of
Bergen (originally called Bjørgvin). The death of Harald Hardrada and the serious defeat suffered by the Norwegians in 1066 tempted the Danish king,
Svend Estridsen, to prepare for an attack on Norway. King Svend no longer felt bound by the ceasefire agreement signed with Harald Hardrada in 1064, since it would only be valid for the two kings during their own lives. However Olaf made peace with King Svend and married the king's daughter
Ingerid. Later, Olav's half sister
Ingegerd married King Svend's son
Olaf. Although there were some attacks on England by Danish forces, peace persisted between Denmark and Norway. Olaf also made peace with
William the Conqueror of England. King Olaf broke with his father's line in his relationship to the church. Harald Hardrada had developed a continuing conflict with the
Archbishopric of Bremen due to the archbishop's authority over the Norwegian church. Unlike his father, Olav recognized that authority fully. Political considerations may have been behind this conciliatory attitude, as may have been Olaf's concern with the church organization. Until his time bishops had formed part of the king's court and traveled with him around the country to take care of the ecclesiastical affairs while the king took care of worldly matters. The bishops established fixed residence in Oslo, Nidaros and Bergen. King Olaf also took the initiative for the construction of churches, including
Christ Church in Bergen and
Nidaros Cathedral in
Trondheim. Olaf strengthened the power of the king and instituted the system of
guilds in Norway. There are strong indications that the government of King Olaf began writing secure provincial laws to a greater extent. The Norwegian law
Gulatingsloven was probably put in writing for the first time during his reign. King Olaf died of illness on 22 September 1093 in Haukbø,
Rånrike, then part of
Norway (now Håkeby,
Tanum Municipality, Sweden). == Appearance and character ==