Magnus I (1024 - October 25, 1047) was the King of Norway from 1035 to 1047 and the King of Denmark from 1042 to 1047. He was the illegitimate son of King Olaf II of Norway, by his concubine Alvhild. He is known by the cognomen, the Good or the Noble.
In the period from 1028 to 1035, he was forced to leave Norway, yet, after the death of Knut the Great, he was called back by the noblemen, tired of living under Danish rule, to be King of Norway. After the death of Harthacanute, he was also made King of Denmark, despite rival claims had by Knut the Great's nephew Sveinn Estridsen. There was great turmoil south of the Danish border, where in 1043 Magnus won an important victory at Lyrskov Hede over the Wends who had invaded Denmark. It was a great victory and legends about the battle say that 15,000 Wends fell in a single day. The Norwegians swore they could hear the St. Olaf's cathedral bell at Trondheim before the battle which they took to mean that Olaf himself was watching over his son and his army.
Sveinn Estridsen did not lightly give up his claim to the Danish crown, and numerous conflicts with Magnus followed. A settlement was eventually agreed to, which made Svend Earl of Denmark. Magnus had trouble in Norway also. There, his uncle, Harald Hardrada, was a strong threat to the throne. In 1046, Magnus was obliged to share the reign of his kingdom with him. In 1047, Sveinn Estridsen was driven out of Denmark by the Norwegians, with the assistance of the Swedish king Anund Jacob. Sveinn could not muster enough support, but had to flee to the province of Scania. Magnus died the same year, in Zealand. On his deathbed, he is said to have made Sveinn his heir in Denmark, and Harald Hardrada his heir in Norway. This was disputed by Harald, who did not approve of Sveinn being the king of Denmark, Sveinn was therefore not allowed to rule Denmark in peace until 1062, when Harald started to set his mind on other lands to conquer. Magnus was buried with his father in Nidaros.
St. Olav's direct line ceased its reign with the death of Magnus. It returned to the throne again in 1280, when Eric II, who through his mother descended from Magnus' legitimate sister, succeeded as king. Magnus' own daughter was in a marriage with a Norwegian nobleman, and the one descendant wed to the Earl of Orkney.