Among the Danes who swore allegiance to King Magnus was Svein, commonly called Svein Estridson, a son of Earl Ulf. His mother was Estrid (Astrid), a daughter of King Svein Tjuguskeg. She was a sister of Canute the Great by the father's side, and of the Swedish king Olaf by the mother's side, her mother being Queen Sigrid the Haughty. One day, as King Magnus was sitting in his high-seat with a large number of men around him, and with Svein Estridson sitting on a footstool before him, the king made a speech, in which he said that he had promised the Danes a chief who could defend and rule the country in the absence of the king. "And," he continued, "I know no better man fitted, in all respects, for this than Svein. I will therefore make him my earl, and give him the government of my Danish dominions while I am in Norway, just as King Canute the Great set his father, Earl Ulf, over Denmark while he was in England." Einar Thambaskelfer, who was with the king, was very ill-pleased with this appointment, as he put no faith in Svein, and said to the king: "Too great an earl, too great an earl, my foster-son!"
King Magnus had an early opportunity to regret his choice, for, the same winter in which Svein was given the administration of the government of Denmark as earl, he successfully courted the friendship of the most influential men, and assumed the title of King of Denmark. King Magnus heard this news, and at the same time that the people of Vendland had a large army with which they plundered in Denmark. He then gathered a large force, with which he sailed to Denmark. There he summoned the people to come to him, and drew together a great army in Jutland. Ordulf, the duke of Brunswick, who the year before had married Ulfhild, the daughter of King Olaf the Saint, and the half-sister of King Magnus,[8] also came to his aid with a great force. King Magnus met the Vends in battle at Lyrskog Heath in Schleswig and gained a great victory. It was generally reported in the army that King Magnus had a vision the night before the battle, in which Olaf the Saint had appeared and had given the king advice. "It is the common saying," says the saga, "that there never was so great a slaughter of men in the northern lands, since the time of Christianity, as took place among the Vendland people on Lyrskog Heath." This was on the 28th of September, 1043. King Magnus followed up his victory, and sailed to Vendland, attacked and captured the fortress of Jomsborg. A great many of the people of Vendland submitted to King Magnus, while others fled the country.